onJsConfirm method

  1. @override
FutureOr<JsConfirmResponse?>? onJsConfirm(
  1. JsConfirmRequest jsConfirmRequest
)
inherited

Event fired when javascript calls the confirm() method to display a confirm dialog. If JsConfirmResponse.handledByClient is true, the webview will assume that the client will handle the dialog.

jsConfirmRequest contains the message to be displayed in the confirm dialog and the of the page requesting the dialog.

Officially Supported Platforms/Implementations:

Parameters - Officially Supported Platforms/Implementations:

  • jsConfirmRequest: all platforms

Use the PlatformInAppBrowserEvents.isMethodSupported method to check if this method is supported at runtime.

Implementation

@override
FutureOr<JsConfirmResponse?>? onJsConfirm(JsConfirmRequest jsConfirmRequest) {
  return null;
}