setWebMessageCallback method
- @SupportedPlatforms.new(platforms: [AndroidPlatform(), IOSPlatform(), MacOSPlatform(), LinuxPlatform(note: 'Implemented via JavaScript MessageChannel API.'), WindowsPlatform(note: 'Implemented via JavaScript MessageChannel API.')])
- WebMessageCallback? onMessage
Sets a callback to receive message events on the main thread.
Implementation
@SupportedPlatforms(
platforms: [
AndroidPlatform(),
IOSPlatform(),
MacOSPlatform(),
LinuxPlatform(note: 'Implemented via JavaScript MessageChannel API.'),
WindowsPlatform(note: 'Implemented via JavaScript MessageChannel API.'),
],
)
Future<void> setWebMessageCallback(WebMessageCallback? onMessage) {
throw UnimplementedError(
'setWebMessageCallback is not implemented on the current platform',
);
}