MockMessageChannelContext class

Context intended for testing message channels. Can also be used for dart-only implementation (i.e. flutter web)

Inheritance
Available extensions

Constructors

MockMessageChannelContext()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

invokeMethod(String channel, String method, [dynamic arg]) Future

Available on MockMessageChannelContext, provided by the MockMethodChannel extension

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerChannel(String name, MessageChannel channel) MessageSender
Registers channel for given name. Returns closure that can be used to send messages for this channel.
override
registerMockChannelHandler(String channel, MessageChannelHandler handler) → void
registerMockEventChannel(String channel, {required void onListen(Sink, dynamic arguments), required void onCancel()}) → void

Available on MockMessageChannelContext, provided by the MockEventChannel extension

registerMockMethodCallHandler(String channel, MethodCallHandler handler) → void

Available on MockMessageChannelContext, provided by the MockMethodChannel extension

sendMessage(String channel, dynamic message) Future
toString() String
A string representation of this object.
inherited

Operators

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