WebMessageListener class
This listener receives messages sent on the JavaScript object which was injected by PlatformInAppWebViewController.addWebMessageListener.
Constructors
-
WebMessageListener({required String jsObjectName, Set<
String> ? allowedOriginRules, OnPostMessageCallback? onPostMessage}) - This listener receives messages sent on the JavaScript object which was injected by PlatformInAppWebViewController.addWebMessageListener.
- WebMessageListener.fromPlatform({required PlatformWebMessageListener platform})
- Constructs a WebMessageListener from a specific platform implementation.
- WebMessageListener.fromPlatformCreationParams({required PlatformWebMessageListenerCreationParams params})
- Constructs a WebMessageListener.
Properties
-
allowedOriginRules
→ Set<
String> ? -
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- jsObjectName → String
-
no setter
- onPostMessage → OnPostMessageCallback?
-
no setter
- platform → PlatformWebMessageListener
-
Implementation of PlatformWebMessageListener for the current platform.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
isClassSupported(
{TargetPlatform? platform}) → bool -
Check if the current class is supported by the defaultTargetPlatform or a specific
platform. -
isMethodSupported(
PlatformWebMessageListenerMethod method, {TargetPlatform? platform}) → bool -
Check if the given
methodis supported by the defaultTargetPlatform or a specificplatform. -
isPropertySupported(
PlatformWebMessageListenerCreationParamsProperty property, {TargetPlatform? platform}) → bool -
Check if the given
propertyis supported by the defaultTargetPlatform or a specificplatform. -
static(
) → WebMessageListener - Provide static access.