gotStorageChange method
Event listener for all storage node changes.
@param event the type of event causing the call @param oldNode the old node content @param newNode the new node content @throws StorageException if the storage backend encounters a problem
Implementation
@override
Future<void> gotStorageChange(
EventType event, Node? oldNode, Node? newNode) async {
events.add(EventChange(event, oldNode, newNode));
log("*** [$pluginId] receives a storage change event***");
if (storageEventHandler != null) {
return storageEventHandler!(event, oldNode, newNode);
} else {
log("\n*** [$pluginId] receives a storage change event***");
log(oldNode != null ? oldNode.toString() : 'null');
log(newNode != null ? newNode.toString() : 'null');
log(event.toString());
log('***\n');
}
}