invoke method
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);
}
}