DefaultPlatformMenuDelegate constructor

DefaultPlatformMenuDelegate({
  1. MethodChannel? channel,
})

Creates a const DefaultPlatformMenuDelegate.

The optional channel argument defines the channel used to communicate with the platform. It defaults to SystemChannels.menu if not supplied.

Implementation

DefaultPlatformMenuDelegate({MethodChannel? channel})
    : channel = channel ?? SystemChannels.menu,
      _idMap = <int, PlatformMenuItem>{} {
  this.channel.setMethodCallHandler(_methodCallHandler);
}