BinaryMessages class

Sends binary messages to and receives binary messages from platform plugins.

See also:

  • BasicMessageChannel, which provides basic messaging services similar to BinaryMessages, but with pluggable message codecs in support of sending strings or semi-structured messages.
  • MethodChannel, which provides platform communication using asynchronous method calls.
  • EventChannel, which provides platform communication using event streams.

See: flutter.io/platform-channels/

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

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

Static 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* methods on this class, on the given channel, without decoding them. [...]