TreeController<TKey, TData> constructor

TreeController<TKey, TData>({
  1. required TickerProvider vsync,
  2. TreeAnimationStyle animationStyle = const TreeAnimationStyle(),
  3. double indentWidth = 0.0,
  4. Comparator<TreeNode<TKey, TData>>? comparator,
})

Creates a tree controller.

Requires a TickerProvider to drive animations. Typically this is the State object of the widget that creates the controller, using TickerProviderStateMixin or SingleTickerProviderStateMixin.

Implementation

TreeController({
  required TickerProvider vsync,
  TreeAnimationStyle animationStyle = const TreeAnimationStyle(),
  double indentWidth = 0.0,
  this.comparator,
}) : assert(animationStyle.debugValidate()),
     _animationStyle = animationStyle,
     _indentWidth = indentWidth,
     _vsync = vsync;