BinaryMessenger class

A messenger which sends binary data across the Flutter platform barrier.

This class also registers handlers for incoming messages.

Constructors

BinaryMessenger()
A const constructor to allow subclasses to be const.
const

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

handlePlatformMessage(String channel, ByteData data, PlatformMessageResponseCallback callback) Future<void>
Calls the handler registered for the given channel. [...]
send(String channel, ByteData message) Future<ByteData>
Send a binary message to the platform plugins on the given channel. [...]
setMessageHandler(String channel, Future<ByteData> handler(ByteData message)) → void
Set a callback for receiving messages from the platform plugins on the given channel, without decoding them. [...]
setMockMessageHandler(String channel, Future<ByteData> handler(ByteData message)) → void
Set a mock callback for intercepting messages from the send method on this class, on the given channel, without decoding them. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited