binaryMessenger property Null safety

BinaryMessenger binaryMessenger

The messenger which sends the bytes for this channel, not null.

Implementation

BinaryMessenger get binaryMessenger {
  final BinaryMessenger result =
      _binaryMessenger ?? ServicesBinding.instance.defaultBinaryMessenger;
  return !kReleaseMode && debugProfilePlatformChannels
      ? _debugBinaryMessengers[this] ??= _ProfiledBinaryMessenger(
          // ignore: no_runtimetype_tostring
          result, runtimeType.toString(), codec.runtimeType.toString())
      : result;
}