expandNode method
- TreeSliverNode<
Object?> node
Expands the TreeSliverNode that was built with this controller.
If the node is already in the expanded state (see isExpanded), calling this method has no effect.
Calling this method may cause the TreeSliver to rebuild, so it may not be called from a build method.
Calling this method will trigger the TreeSliver.onNodeToggle callback.
See also:
- collapseNode, which collapses the TreeSliverNode.
- isExpanded to check whether the tile is expanded.
- TreeSliver.controller to create a TreeSliver with a controller.
Implementation
void expandNode(TreeSliverNode<Object?> node) {
assert(_state != null);
if (!node.isExpanded) {
_state!.toggleNode(node);
}
}