A service that can be implemented by the host application and the Flutter framework to exchange application-specific messages.

Static Methods

addJSONMessageHandler(String channel, Future callback(json)) → void

Register a callback for receiving JSON messages from the host application.

addMessageHandler(String channel, Future<String> callback(String message)) → void

Register a callback for receiving messages from the host application.

sendJSON(String channel, [ json ]) Future

Sends a JSON-encoded message to the host application and JSON-decodes the response.

sendToHost(String channel, [ String message = '' ]) Future<String>

Send a message to the host application.

Constructors

HostMessages()

Properties

hashCode int

Get a hash code for this object.

read-only, inherited
runtimeType Type

A representation of the runtime type of the object.

read-only, inherited

Operators

operator ==(other) bool

The equality operator.

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