BleMethodChannelRouter.forChannel constructor
BleMethodChannelRouter.forChannel(
- MethodChannel channel
Returns the shared router, installing the native handler on first access.
Implementation
factory BleMethodChannelRouter.forChannel(MethodChannel channel) {
final Map<String, BleMethodChannelRouter> routers =
_routers[channel.binaryMessenger] ??=
<String, BleMethodChannelRouter>{};
return routers.putIfAbsent(
channel.name,
() => BleMethodChannelRouter._(channel),
);
}