VSNodeSerializationManager constructor

VSNodeSerializationManager({
  1. required List nodeBuilders,
  2. dynamic onBuilderMissing(
    1. Map nodeJSON
    )?,
  3. List<VSNodeDataBuilder>? additionalNodes,
})

Builds maps based on supplied nodeBuilders

Makes sure supplied nodeBuilders follow guidlines

Handles serialization and deserialization

Implementation

VSNodeSerializationManager({
  required List<dynamic> nodeBuilders,
  this.onBuilderMissing,

  ///These nodes will not be part of [contextNodeBuilders]
  ///
  ///They will only be used for deserialization
  List<VSNodeDataBuilder>? additionalNodes,
}) {
  if (additionalNodes != null) {
    for (final node in additionalNodes) {
      _addNodeBuilder(node);
    }
  }

  _findNodes(nodeBuilders, contextNodeBuilders);
}