MethodChannelMessenger constructor

MethodChannelMessenger(
  1. String channelName
)

Default constructor for MethodChannelMessenger.

channelName is the name used for channel.

Implementation

MethodChannelMessenger(String channelName)
    : channel = MethodChannel(
        channelName,
        const StandardMethodCodec(ReferenceMessageCodec()),
      ) {
  channel.setMethodCallHandler(_handleMethodCall);
}