FlattenService class

Constructors

FlattenService()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

collapseNode<T>({required List<FlatNode<T>> currentList, required String nodeId}) → ({int index, List<FlatNode<T>> list})?
Incrementally collapse a node: remove all descendants that follow it.
expandNode<T>({required List<FlatNode<T>> currentList, required String nodeId, required Set<String>? expandedNodeIds}) → ({int index, List<FlatNode<T>> list})?
Incrementally expand a node: insert its flattened subtree right after it.
flatten<T>({required List<Node<T>> nodes, required Set<String>? expandedNodeIds, int depth = 0, bool isRoot = true, int ancestorIsLastMask = 0}) List<FlatNode<T>>
Flattens a tree of nodes into a list of FlatNodes, only including children of expanded nodes.