deregisterPlugin method
Unregisters an already registered plugin in the toolbox.
Throws CommunicationException if the provided id is not available in the current auth database.
Implementation
@override
Future<void> deregisterPlugin([String? pluginId]) async {
if (pluginId != null) {
menuItems.removeWhere((_, value) => value.action.plugin == pluginId);
plugins.remove(StorableString(pluginId));
await storeState();
return;
}
await CommunicationHelper.sendAndWait(
this,
Message(id, GeigerApi.masterId, MessageType.deregisterPlugin,
GeigerUrl(null, GeigerApi.masterId, 'deregisterPlugin')));
}