Tree<T> class
- Inheritance
Constructors
-
Tree({Key? key, List<
TreeNode< ? roots, TreeController<T> >T> ? controller, Set<TreeNodeId> ? initiallyExpanded, bool showToolbar = true, bool showSearch = true, bool showCheckboxes = false, bool showGuides = true, bool dense = false, bool editable = true, TreeIconBuilder<T> ? iconBuilder, TreeWidgetBuilder<T> ? trailingBuilder, TreeWidgetBuilder<T> ? labelBuilder, TreeActionsBuilder<T> ? contextActions, ValueChanged<TreeNode< ? onSelected, ValueChanged<T> >TreeNode< ? onActivated, ValueChanged<T> >Set< ? onCheckedChanged, ValueChanged<TreeNodeId> >List< ? onChanged, Widget? emptyState})TreeNode< >T> > -
const
Properties
-
contextActions
→ TreeActionsBuilder<
T> ? -
final
-
controller
→ TreeController<
T> ? -
Drive/observe from outside. When null the widget owns a private one.
final
- dense → bool
-
Compact row height.
final
- editable → bool
-
Allow inline rename (double-click / F2 / Enter) and structural edits via
the context menu. When false the tree is read-only for navigation.
final
- emptyState → Widget?
-
Placeholder when the (filtered) tree is empty.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
iconBuilder
→ TreeIconBuilder<
T> ? -
final
-
initiallyExpanded
→ Set<
TreeNodeId> ? -
Ids expanded on first build (ignored when a controller is supplied).
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
labelBuilder
→ TreeWidgetBuilder<
T> ? -
final
-
onActivated
→ ValueChanged<
TreeNode< ?T> > -
final
-
onChanged
→ ValueChanged<
List< ?TreeNode< >T> > -
final
-
onCheckedChanged
→ ValueChanged<
Set< ?TreeNodeId> > -
final
-
onSelected
→ ValueChanged<
TreeNode< ?T> > -
final
-
roots
→ List<
TreeNode< ?T> > -
Initial forest. Required when controller is null.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showCheckboxes → bool
-
final
-
final
- showGuides → bool
-
final
- showSearch → bool
-
final
- showToolbar → bool
-
final
-
trailingBuilder
→ TreeWidgetBuilder<
T> ? -
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< Tree< T> > -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited