onJavascriptChannelMessage method
Invoked when a JavaScript channel message is received.
Implementation
void onJavascriptChannelMessage(String channel, String message) {
final JavascriptChannel? javascriptChannel = channels[channel];
if (javascriptChannel == null) {
throw ArgumentError('No channel registered with name $channel.');
}
javascriptChannel.onMessageReceived(JavascriptMessage(message));
}