port2 property

  1. @SupportedPlatforms.new(platforms: [AndroidPlatform(), IOSPlatform(), MacOSPlatform(), LinuxPlatform(note: 'Implemented via JavaScript MessageChannel API.'), WindowsPlatform(note: 'Implemented via JavaScript MessageChannel API.')])
PlatformWebMessagePort port2
final

The second PlatformWebMessagePort object of the channel.

Officially Supported Platforms/Implementations:

  • Android WebView
  • iOS WKWebView
  • macOS WKWebView
  • Linux WPE WebKit:
    • Implemented via JavaScript MessageChannel API.
  • Windows WebView2:
    • Implemented via JavaScript MessageChannel API.

Use the PlatformWebMessageChannelCreationParams.isPropertySupported method to check if this property is supported at runtime.

Implementation

@SupportedPlatforms(
  platforms: [
    AndroidPlatform(),
    IOSPlatform(),
    MacOSPlatform(),
    LinuxPlatform(note: 'Implemented via JavaScript MessageChannel API.'),
    WindowsPlatform(note: 'Implemented via JavaScript MessageChannel API.'),
  ],
)
final PlatformWebMessagePort port2;