registerJavaScriptChannel method

void registerJavaScriptChannel(
  1. dynamic webViewController
)

Registers the JavaScript channel with the WebView controller to receive tracking messages.

Implementation

void registerJavaScriptChannel(dynamic webViewController) {
  webViewController.addJavaScriptChannel(
    channelName,
    onMessageReceived: (message) {
      handleMessage(message.message);
    },
  );
}