SyncedSliverTree<TKey, TItem> constructor

const SyncedSliverTree<TKey, TItem>({
  1. required Iterable<SyncedTreeNode<TKey, TItem>> tree,
  2. required TreeItemBuilder<TKey, TItem> itemBuilder,
  3. bool preserveExpansion = true,
  4. bool initiallyExpanded = true,
  5. Duration animationDuration = const Duration(milliseconds: 300),
  6. Curve animationCurve = Curves.easeInOut,
  7. double indentWidth = 0.0,
  8. int maxStickyDepth = 0,
  9. Key? key,
})

Creates a synced sliver tree from an immutable nested tree.

Implementation

const SyncedSliverTree({
  required Iterable<SyncedTreeNode<TKey, TItem>> tree,
  required this.itemBuilder,
  this.preserveExpansion = true,
  this.initiallyExpanded = true,
  this.animationDuration = const Duration(milliseconds: 300),
  this.animationCurve = Curves.easeInOut,
  this.indentWidth = 0.0,
  this.maxStickyDepth = 0,
  super.key,
}) : _mode = _SyncedSliverTreeMode.tree,
     _tree = tree,
     _nodeRoots = null,
     _nodeChildrenOf = null,
     _hierarchyRoots = null,
     _flatItems = null,
     _snapshot = null,
     _keyOf = null,
     _childrenOf = null,
     _parentOf = null;