onJsPrompt property
Event fired when javascript calls the prompt()
method to display a prompt dialog.
If JsPromptResponse.handledByClient is true
, the webview will assume that the client will handle the dialog.
jsPromptRequest
contains the message to be displayed in the prompt dialog, the default value displayed in the prompt dialog, and the of the page requesting the dialog.
Officially Supported Platforms/Implementations:
- Android native WebView (Official API - WebChromeClient.onJsPrompt)
- iOS (Official API - WKUIDelegate.webView)
- MacOS (Official API - WKUIDelegate.webView)
Implementation
final Future<JsPromptResponse?> Function(
T controller, JsPromptRequest jsPromptRequest)? onJsPrompt;