sendPluginEventType method
Send a simple Plugin Event which contain only the message type to the GeigerToolbox
Implementation
Future<bool> sendPluginEventType(MessageType messageType) async {
try {
log('Trying to send a message type $messageType');
// final GeigerUrl pluginURL = GeigerUrl.fromSpec('geiger://$pluginId');
final Message request = Message(
pluginId,
GeigerApi.masterId,
messageType,
null,
);
await pluginApi!.sendMessage(request);
log('A message type $messageType has been sent successfully');
return true;
} catch (e, trace) {
log('Failed to send a message type $messageType');
log(e.toString());
if (exceptionHandler != null) {
exceptionHandler!(e, trace);
}
return false;
}
}