invoke method

void invoke(
  1. int? id,
  2. String method,
  3. Map<String, dynamic>? params
)
inherited

Implementation

void invoke(int? id, String method, Map<String, dynamic>? params) {
  switch (method) {
    case 'enable':
      _enable = true;
      sendToFrontend(id, null);
      break;
    case 'disable':
      _enable = false;
      sendToFrontend(id, null);
      break;

    default:
      if (_enable) receiveFromFrontend(id, method, params);
  }
}