TreePath<T> constructor

TreePath<T>({
  1. required T root,
  2. required String onLabel(
    1. T
    ),
  3. required FutureOr<List<T>> onSiblings(
    1. T
    ),
  4. required FutureOr<List<T>> onChildren(
    1. T
    ),
  5. void onChanged(
    1. List<T>
    )?,
  6. bool cache = true,
})

Implementation

TreePath({
  required T root,
  required String Function(T) onLabel,
  required FutureOr<List<T>> Function(T) onSiblings,
  required FutureOr<List<T>> Function(T) onChildren,
  void Function(List<T>)? onChanged,
  bool cache = true,
}) : _onChanged = onChanged,
     _onSiblings = onSiblings,
     _onChildren = onChildren,
     _onLabel = onLabel,
     _cached = cache,
     super() {
  _paths.add(root);
}