binaryMessenger property

BinaryMessenger binaryMessenger

The messenger which sends the bytes for this channel.

On the root isolate or web, this defaults to the ServicesBinding.defaultBinaryMessenger. In other contexts the default value is a BackgroundIsolateBinaryMessenger from BackgroundIsolateBinaryMessenger.ensureInitialized.

Implementation

BinaryMessenger get binaryMessenger =>
    _binaryMessenger ?? _findBinaryMessenger();