onJsAlert property
Future<JsAlertResponse?> Function(dynamic controller, JsAlertRequest jsAlertRequest)?
onJsAlert
finalinherited
Event fired when javascript calls the alert()
method to display an alert dialog.
If JsAlertResponse.handledByClient
is true
, the webview will assume that the client will handle the dialog.
jsAlertRequest
contains the message to be displayed in the alert dialog and the of the page requesting the dialog.
Officially Supported Platforms/Implementations:
- Android native WebView (Official API - WebChromeClient.onJsAlert)
- iOS (Official API - WKUIDelegate.webView)
- MacOS (Official API - WKUIDelegate.webView)
Implementation
final Future<JsAlertResponse?> Function(
T controller, JsAlertRequest jsAlertRequest)? onJsAlert;