serialize method

  1. @override
Map<String, dynamic>? serialize(
  1. DocumentNode node
)
override

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;
}