KamomeClient class
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
Constants
-
apiName
→ const String
-
The name of Kamome API in JavaScript.