ios. tried different SO solution nothing worked.
tried using `webview_flutter`and
also InAppWebView, adding flutterDownload etc
final options = InAppWebViewGroupOptions(
crossPlatform: InAppWebViewOptions(
useOnDownloadStart: true,
javaScriptEnabled: true,
allowFileAccessFromFileURLs: true,
allowUniversalAccessFromFileURLs: true,
javaScriptCanOpenWindowsAutomatically: true,
mediaPlaybackRequiresUserGesture: false,
),
android: AndroidInAppWebViewOptions(
useHybridComposition: true,
supportMultipleWindows: true,
),
ios: IOSInAppWebViewOptions(
allowsInlineMediaPlayback: true,
));
onDownloadStartRequest: (controller, DownloadStartRequest url) async {
Directory? tempDir = await getExternalStorageDirectory();
setState(() {});
await FlutterDownloader.enqueue(
url: url.url.toString(),
fileName: url.suggestedFilename,
savedDir: tempDir!.path,
showNotification: true,
requiresStorageNotLow: false,
openFileFromNotification: true,
saveInPublicStorage: true,
);
},
from webview probably not, if rip off some urls to file from webview probably yes
have found some open git issue regarding this :(
Обсуждают сегодня