WebMessageListener constructor
WebMessageListener({
- required String jsObjectName,
- Set<
String> ? allowedOriginRules, - OnPostMessageCallback? onPostMessage,
This listener receives messages sent on the JavaScript object which was injected by PlatformInAppWebViewController.addWebMessageListener.
Officially Supported Platforms/Implementations:
- Android native WebView
- iOS
- MacOS
Implementation
WebMessageListener(
{required String jsObjectName,
Set<String>? allowedOriginRules,
OnPostMessageCallback? onPostMessage})
: this.fromPlatformCreationParams(
params: PlatformWebMessageListenerCreationParams(
jsObjectName: jsObjectName,
allowedOriginRules: allowedOriginRules,
onPostMessage: onPostMessage));