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