KamomeClient class

Constructors

KamomeClient(JavaScriptRunner _jsRunner)

Properties

hashCode int
The hash code for this object.
no setterinherited
howToHandleNonExistentCommand HowToHandleNonExistentCommand
How to handle non-existent command.
getter/setter pair
isReady bool
Tells whether the Kamome JavaScript library is ready.
no setter
readEventListener ReadEventListener?
A ready event listener. The listener is called when the Kamome JavaScript library goes ready state.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(Command command) → void
Adds a command called by the JavaScript code.
execute(String commandName, {Map<String, dynamic>? data, required LocalCompletionCallback callback}) → void
Executes specified commandName's command.
hasCommand(String name) bool
Tells whether a command of specified name is added. Returns true if the command is added, otherwise false.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onMessageReceived(String message) → void
The receiver method that the JavaScript object passes a message. For example, if you use webview_flutter plugin, see following code.
remove(String commandName) → void
Removes a command of specified commandName.
send(String commandName, {Map<String, dynamic>? data, SendMessageCallback? callback}) → void
Sends a message to the JavaScript receiver with a commandName.
sendWithListData(String commandName, List? data, {SendMessageCallback? callback}) → void
Sends a message with a data as List to the JavaScript receiver with a commandName.
toString() String
A string representation of this object.
inherited

Operators

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

Constants

apiName → const String
The name of Kamome API in JavaScript.