updatePluginInfo method
Future<bool>
updatePluginInfo(
- String pluginId,
- String companyName,
- List<
MultilingualValues> description
Update the information of the external plugin
Implementation
Future<bool> updatePluginInfo(String pluginId, String companyName,
List<MultilingualValues> description) async {
// Prepare the plugin node
bool ret = await prepareRoot(
[
'Devices',
currentDeviceId!,
],
);
if (ret == false) {
log('Failed to prepare the plugin node');
return false;
}
// Write plugin info
Node node = NodeImpl(pluginId, pluginId, ":Devices:${currentDeviceId!}");
await node.addOrUpdateValue(
NodeValueImpl('name', pluginName),
);
await node.addOrUpdateValue(
NodeValueImpl('company_name', companyName),
);
await addMultilingualValues(node, 'description', description);
if (ret == false) {
log('Failed to store plugin information');
return false;
}
return true;
}