TreeViewItem constructor
TreeViewItem({
- Key? key,
- Widget? leading,
- required Widget content,
- dynamic value,
- List<
TreeViewItem> children = const [], - bool collapsable = true,
- bool? expanded,
- bool? selected = false,
- TreeViewItemInvoked? onInvoked,
- TreeViewItemOnExpandToggle? onExpandToggle,
- Map<
Type, GestureRecognizerFactory< gestures = const {},GestureRecognizer> > - ButtonState<
Color> ? backgroundColor, - bool autofocus = false,
- FocusNode? focusNode,
- String? semanticLabel,
- Widget? loadingWidget,
- bool lazy = false,
Creates a tree view item.
Implementation
TreeViewItem({
this.key,
this.leading,
required this.content,
this.value,
this.children = const [],
this.collapsable = true,
bool? expanded,
this.selected = false,
this.onInvoked,
this.onExpandToggle,
this.gestures = const {},
this.backgroundColor,
this.autofocus = false,
FocusNode? focusNode,
this.semanticLabel,
this.loadingWidget,
this.lazy = false,
}) : expanded = expanded ?? children.isNotEmpty,
_anyExpandableSiblings = false,
focusNode = focusNode ?? FocusNode();