postMessage method

  1. @SupportedPlatforms.new(platforms: [AndroidPlatform(), IOSPlatform(), MacOSPlatform(), LinuxPlatform(), WindowsPlatform()])
Future<void> postMessage(
  1. WebMessage message
)

Post a message to the injected JavaScript object which sent this PlatformJavaScriptReplyProxy.

If message is of type WebMessageType.ARRAY_BUFFER, be aware that large byte buffers can lead to out-of-memory crashes on low-end devices.

Official Android API: https://developer.android.com/reference/androidx/webkit/JavaScriptReplyProxy#postMessage(java.lang.String)

Implementation

@SupportedPlatforms(
  platforms: [
    AndroidPlatform(),
    IOSPlatform(),
    MacOSPlatform(),
    LinuxPlatform(),
    WindowsPlatform(),
  ],
)
Future<void> postMessage(WebMessage message) {
  throw UnimplementedError(
    'postMessage is not implemented on the current platform.',
  );
}