ITreeNode<T> mixin

Base class that allows a data of type T to be wrapped in a ListenableNode

Superclass Constraints
Implemented types
Mixin Applications

Properties

addedNodes Stream<NodeAddEvent<INode>>
Listen to this Stream to get updates on when a Node or a collection of Nodes is added to the current node. It returns a stream of NodeAddEvent
no setterinherited
areChildIndicesCached bool
getter/setter pair
children Object?
These are the children of the node. It is a collection that can be any appropriate data-structure like List or Map
no setterinherited
childrenAsList List<INode>
This returns the children as an iterable list. Since children can be implemented using any suitable data-structure, therefore by having an iterable list as children ensures that the children can always be iterated when required.
no setterinherited
data ↔ T?
The data value of T wrapped in the ITreeNode
getter/setter pair
expansionNotifier ValueNotifier<bool>
ValueNotifier for node expansion/collapse
latefinal
hashCode int
The hash code for this object.
no setterinherited
insertedNodes Stream<NodeInsertEvent<INode>>
Listen to this Stream to get updates on when a Node or a collection of Nodes is inserted in the current node. It returns a stream of insertedNodes
no setterinherited
isExpanded bool
Shows whether the node is expanded or not
no setter
isLastChild bool
getter/setter pair
isLeaf bool
Getter to check if the node is a Leaf. A Leaf-Node does have any children.
no setterinherited
isRoot bool
Getter to check if the node is a root. Root is always the first node in a Tree. A Root-Node never has a parent.
no setterinherited
key String
This is the uniqueKey that every node needs to implement
no setterinherited
length int
Getter to get the total number of children
no setterinherited
level int
Getter to get the level i.e. how many iterations it will take to get to the root. ** Note: starting index is 0.
no setterinherited
listenableData ValueNotifier<T?>
ValueNotifier for data T that can be listened for data changes;
no setter
meta Map<String, dynamic>?
Any related data that needs to be accessible from the node can be added to meta without needing to extend or implement the INode
getter/setter pairinherited
parent INode?
This is the parent INode. Only the root node has a null parent
covariantgetter/setter pairinherited
path String
Path of the node in the tree. It provides information about the node hierarchy by listing all the ancestors of the node.
no setterinherited
removedNodes Stream<NodeRemoveEvent<INode>>
Listen to this Stream to get updates on when a Node or a collection of Nodes is removed from the current node. It returns a stream of NodeRemoveEvent
no setterinherited
root INode
Getter to get the root node. If the current node is not a root, then the getter will traverse up the path to get the root.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value INode
The current value of the object. When the value changes, the callbacks registered with addListener will be invoked.
no setterinherited

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object notifies its listeners.
inherited
cacheChildIndices() → void
dispose() → void
inherited
elementAt(String path) INode
  • Utility method to get a child node at the path. Get any item at path from the root The keys of the items to be traversed should be provided in the path
  • inherited
    noSuchMethod(Invocation invocation) → dynamic
    Invoked when a nonexistent method or property is accessed.
    inherited
    removeListener(VoidCallback listener) → void
    Remove a previously registered closure from the list of closures that the object notifies.
    inherited
    resetIndentationCache() → void
    toString() String
    A string representation of this object.
    inherited

    Operators

    operator ==(Object other) bool
    The equality operator.
    inherited
    operator [](String path) INode
    Overloaded operator for elementAt
    inherited