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) {
  if (method == 'enable') {
    _enable = true;
    sendToFrontend(id, null);
  } else if (method == 'disable') {
    _enable = false;
    sendToFrontend(id, null);
  }

  if (_enable) {
    receiveFromFrontend(id, method, params);
  }
}