invoke method

  1. @override
String invoke(
  1. String method,
  2. dynamic params,
  3. InvokeModuleCallback callback
)
override

Implementation

@override
String invoke(String method, params, InvokeModuleCallback callback) {
  switch (method) {
    case 'getConnectivity': {
      getConnectivity((Map json) {
        callback(data: json);
      });
      break;
    }
    case 'onConnectivityChanged': {
      onConnectivityChanged((Map data) {
        moduleManager!.emitModuleEvent(name, data: data);
      });
      break;
    }
  }

  return '';
}