TestDefaultBinaryMessenger class

A BinaryMessenger subclass that is used as the default binary messenger under testing environment.

It tracks status of data sent across the Flutter platform barrier, which is useful for testing frameworks to monitor and synchronize against the platform messages.

Inheritance

Constructors

TestDefaultBinaryMessenger(BinaryMessenger delegate)
Creates a TestDefaultBinaryMessenger instance. [...]

Properties

delegate BinaryMessenger
The delegate BinaryMessenger.
final
pendingMessageCount int
The number of incomplete/pending calls sent to the platform channels.
read-only
platformMessagesFinished Future<void>
Returns a Future that completes after all the platform calls are finished. [...]
read-only
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. [...]
override
send(String channel, ByteData message) Future<ByteData>
Send a binary message to the platform plugins on the given channel. [...]
override
setMessageHandler(String channel, MessageHandler handler) → void
Set a callback for receiving messages from the platform plugins on the given channel, without decoding them. [...]
override
setMockMessageHandler(String channel, MessageHandler handler) → void
Set a mock callback for intercepting messages from the send method on this class, on the given channel, without decoding them. [...]
override
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