TreeWidget<T> constructor

TreeWidget<T>({
  1. required TreeNode<T> root,
  2. void onSelect(
    1. TreeNode<T>
    )?,
  3. Style selectedStyle = const Style(foreground: CharmColors.pepper, background: CharmColors.charple, modifiers: Modifier.bold),
  4. Style unselectedStyle = const Style(foreground: CharmColors.soda),
  5. Style lineStyle = const Style(foreground: CharmColors.bbq),
  6. bool showRoot = true,
  7. bool focused = true,
})

Creates a TreeWidget with the specified root node.

Implementation

TreeWidget({
  required this.root,
  this.onSelect,
  this.selectedStyle = const Style(
    foreground: CharmColors.pepper,
    background: CharmColors.charple,
    modifiers: Modifier.bold,
  ),
  this.unselectedStyle = const Style(foreground: CharmColors.soda),
  this.lineStyle = const Style(foreground: CharmColors.bbq),
  this.showRoot = true,
  this.focused = true,
}) {
  _updateFlatNodes();
}