invoke method
String
invoke(
- String method,
- dynamic params,
- InvokeModuleCallback callback
)
Implementation
@override
String invoke(String method, dynamic params, callback) {
if (method == 'init') {
return init(params, (String id, Event event) {
moduleManager!.emitModuleEvent(name, event: event, data: id);
});
} else if (method == 'addEvent') {
addEvent(params[0], params[1]);
} else if (method == 'send') {
send(params[0], params[1]);
} else if (method == 'close') {
close(params[0], params[1], params[2]);
}
return '';
}