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
hashCode int
The hash code for this object. [...]
read-only, inherited
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
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

checkMessageHandler(String channel, MessageHandler handler) bool
Returns true if the handler argument matches the handler previously passed to setMessageHandler. [...]
override
checkMockMessageHandler(String channel, MessageHandler handler) bool
Returns true if the handler argument matches the handler previously passed to setMockMessageHandler. [...]
override
handlePlatformMessage(String channel, ByteData data, PlatformMessageResponseCallback callback) Future<void>
Calls the handler registered for the given channel. [...]
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
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
toString() String
Returns a string representation of this object.
inherited

Operators

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