addChannel method

dynamic addChannel(
  1. String name,
  2. FlutterJsChannelCallbak fn, {
  3. String? dartChannelAddress,
})

Implementation

addChannel(String name, FlutterJsChannelCallbak fn,
    {String? dartChannelAddress}) {
  _channels[name] = fn;
  _methodChannel.invokeMethod(
    "registerChannel",
    {
      "engineId": id,
      "channelName": name,
      "dartChannelAddress": dartChannelAddress
    },
  );
}