onDownloadStartRequest method

void onDownloadStartRequest(
  1. DownloadStartRequest downloadStartRequest
)
inherited

Event fired when WebView recognizes a downloadable file. To download the file, you can use the flutter_downloader plugin.

downloadStartRequest represents the request of the file to download.

NOTE: In order to be able to listen this event, you need to set InAppWebViewOptions.useOnDownloadStart option to true.

Official Android API: https://developer.android.com/reference/android/webkit/WebView#setDownloadListener(android.webkit.DownloadListener)

Official iOS API: https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455643-webview

Implementation

void onDownloadStartRequest(DownloadStartRequest downloadStartRequest) {}