serialize method
Serialization
return:
{ "keyNodeType":"ImageNode", "keyNodeInfo":{ The current node serializes the information. } }
Implementation
@override
Map<String, dynamic>? serialize(DocumentNode node) {
if (node.runtimeType == T) {
return {keyNodeType: T.toString(), keyNodeInfo: serializeNode(node as T)};
}
return null;
}