NodeViewModelState.fromArray constructor
NodeViewModelState.fromArray({
- required int treeDepth,
- required String key,
- required NodeViewModelState? parent,
Build a NodeViewModelState as an array. An array is a JSON node containing an array of objects, each element inside the array is represented by another NodeViewModelState. Thus it can be values or classes. Its value is always a List<NodeViewModelState> containing the children information.
Implementation
factory NodeViewModelState.fromArray({
required int treeDepth,
required String key,
required NodeViewModelState? parent,
}) =>
NodeViewModelState._(
isArray: true,
key: key,
treeDepth: treeDepth,
parent: parent,
);