onJsAlert method

Future<JsAlertResponse?>? onJsAlert(
  1. JsAlertRequest jsAlertRequest
)

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:

Implementation

Future<JsAlertResponse?>? onJsAlert(JsAlertRequest jsAlertRequest) {
  return null;
}