FlutterMacOSWebView constructor
FlutterMacOSWebView({
- void onOpen()?,
- void onClose()?,
- void onPageStarted(
- String? url
- void onPageFinished(
- String? url
- void onWebResourceError(
- WebResourceError error
Creates a FlutterMacOSWebView with the specified callbacks:
onOpen
- the WebView has been opened
onClose
- the WebView has been closed
onPageStarted
- the WebView has started loading
url you've passed initially and for all subsequent url changes (user clicks a link, etc)
onPageFinished
- the WebView has finished loading url
onWebResourceError
- the WebView failed loading page or some Javascript exception occured.
See WebResourceErrorType enum
Implementation
FlutterMacOSWebView({
this.onOpen,
this.onClose,
this.onPageStarted,
this.onPageFinished,
this.onWebResourceError,
}) : _channel = MethodChannel(_kChannel) {
_channel.setMethodCallHandler(_onMethodCall);
}