Stratify<T> class

Transforms a tree from link representation to hierarchy.

Constructors

Stratify({dynamic id(T, int, Iterable<T>)?, dynamic parentId(T, int, Iterable<T>)?})
Constructs a new stratify operator.

Properties

hashCode int
The hash code for this object.
no setterinherited
id ↔ dynamic Function(T, int, Iterable<T>)?
The id accessor is invoked for each element in the input data passed to the stratify operator (Stratify.call), being passed the current datum (d) and the current index (i). The returned string is then used to identify the node’s relationships in conjunction with the parentId.
getter/setter pair
parentId ↔ dynamic Function(T, int, Iterable<T>)?
The parent id accessor is invoked for each element in the input data passed to the stratify operator (Stratify.call), being passed the current datum (d) and the current index (i). The returned string is then used to identify the node’s relationships in conjunction with the id.
getter/setter pair
path String Function(T, int, Iterable<T>)?
If a path accessor is set, the id and parentId accessors are ignored, and a unix-like hierarchy is computed on the slash-delimited strings returned by the path accessor, imputing parent nodes and ids as necessary.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

call(Iterable<T> data) HierarchyNode<T?>
Generates a new hierarchy from the specified tabular data.
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

withDefaults<T extends Map>({dynamic id(Map, int, Iterable<Map>)? = defaultId, dynamic parentId(Map, int, Iterable<Map>)? = defaultParentId}) Stratify<T>