MethodChannelMessenger class

Implementation of a TypeChannelMessenger using a MethodChannel.

Inheritance

Constructors

MethodChannelMessenger(String channelName)
Default constructor for MethodChannelMessenger.

Properties

channel MethodChannel
MethodChannel used to communicate with the platform TypeChannelMessenger.
final
converter StandardMessageCodecConverter
Attempts to convert objects to PairedInstances and vice-versa.
final
hashCode int
The hash code for this object.
no setterinherited
instanceManager InstanceManager
Maintains access to instances.
no setterinherited
messageDispatcher MethodChannelDispatcher
Dispatches messages to other TypeChannelMessengers.
latefinal
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createNewInstancePair(String channelName, Object instance, List<Object?> arguments, {required bool owner}) Future<PairedInstance?>
Create a new PairedInstance to be paired with instance.
inherited
disposeInstancePair(Object instance) Future<void>
Dispose the instance pair containing instance.
inherited
getChannelHandler(String channelName) TypeChannelHandler<Object>?
Retrieve the registered TypeChannelHandler for a type channel.
inherited
getPairedObject(PairedInstance pairedInstance) Object?
Retrieve the Object paired to pairedInstance.
inherited
getPairedPairedInstance(Object instance) PairedInstance?
Retrieve the PairedInstance paired to instance.
inherited
isPaired(Object instance) bool
Whether instance is paired with a PairedInstance.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onReceiveCreateNewInstancePair(String channelName, PairedInstance pairedInstance, List<Object?> arguments, {required bool owner}) Object?
Create and store a new instance pair for a type channel.
inherited
onReceiveDisposeInstancePair(PairedInstance pairedInstance) → void
Dispose of the pair containing pairedInstance.
inherited
onReceiveInvokeMethod(String channelName, PairedInstance pairedInstance, String methodName, List<Object?> arguments) Object?
Invoke a method on pairedInstance for a type channel.
inherited
onReceiveInvokeStaticMethod(String channelName, String methodName, List<Object?> arguments) Object?
Invoke a static method for a type channel.
inherited
registerHandler(String channelName, TypeChannelHandler<Object> handler) → void
Sets a TypeChannelHandler for a type channel with channelName.
inherited
sendInvokeMethod(String channelName, Object instance, String methodName, List<Object?> arguments) Future<Object?>
Send a message to invoke a method on the PairedInstance paired with instance.
inherited
sendInvokeStaticMethod(String channelName, String methodName, List<Object?> arguments) Future<Object?>
Invoke static method methodName on type channel of channelName.
inherited
toString() String
A string representation of this object.
inherited
unregisterHandler(String channelName) → void
Removes a TypeChannelHandler for the type channel of channelName.
inherited

Operators

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

Static Properties

instance MethodChannelMessenger
Global manager maintained by reference plugin.
final