postMessage method
- String message
Sends a postMessage request using the origin communicated via requestPostMessageChannel. Fails when called before PlatformChromeSafariBrowserEvents.onMessageChannelReady event.
message – The message that is being sent.
Returns an integer constant about the postMessage request result. Will return CustomTabsPostMessageResultType.SUCCESS if successful.
Officially Supported Platforms/Implementations:
- Android Chrome Custom Tabs (Official API - CustomTabsSession.postMessage)
Parameters - Officially Supported Platforms/Implementations:
message: all platforms
Use the PlatformChromeSafariBrowser.isMethodSupported method to check if this method is supported at runtime.
Implementation
Future<CustomTabsPostMessageResultType> postMessage(String message) =>
platform.postMessage(message);