invokeMethod method
Implementation
Future<dynamic> invokeMethod(String method, Map params) async {
Logger.debug('MPJS: invokeMethod, method = $method, params = $params');
final client = _activeClient;
final id = UuidV4().generate();
final completer = Completer();
_invokeMethodCompleters[id] = completer;
if (client != null) {
client.add(json.encode({
"id": id,
"method": method,
"params": params,
}));
}
return completer.future;
}