CarpenterTreeView<T> class
final
Controlled hierarchical collection with keyboard navigation and DnD. Pointer selection also focuses the tree, so subsequent keyboard navigation and ancestor command shortcuts operate on the selected row. Selection itself remains controlled by selectedIds and onSelectionChanged.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- CarpenterTreeView
Constructors
-
CarpenterTreeView({Key? key, required List<
CarpenterTreeNode< nodes, CarpenterTreeController? controller, Set<T> >Object> expandedIds = const {}, Set<Object> selectedIds = const {}, Set<Object> cutIds = const {}, CarpenterTreeSelectionMode selectionMode = CarpenterTreeSelectionMode.single, CollectionMultiSelectionBehavior multipleSelectionBehavior = CollectionMultiSelectionBehavior.toggle, ScrollController? scrollController, CarpenterTreeExpansionChanged? onExpansionChanged, CarpenterTreeSelectionChanged? onSelectionChanged, CarpenterTreeActivation<T> ? onActivated, CarpenterTreeNodePredicate<T> ? filter, CarpenterTreeDropCallback<T> ? onDrop, CarpenterTreeDropAcceptance<T> ? canDrop, CarpenterTreeNodeCallback<T> ? onRetryLoad, CarpenterTreeNodeBuilder<T> ? itemBuilder, CarpenterTreeRowBuilder<T> ? rowBuilder, CarpenterTreeIconBuilder<T> ? iconBuilder, bool tableRows = false, bool tableRowContentPadding = true, CarpenterTreeActionsBuilder<T> ? actions, CarpenterDragActivation dragActivation = CarpenterDragActivation.immediate, Set<CarpenterDragOperation> dragOperations = const {CarpenterDragOperation.move}, bool autoExpandOnHover = true, String semanticLabel = 'Дерево'}) -
Creates a controlled hierarchical view of
nodes.const
Properties
-
actions
→ CarpenterTreeActionsBuilder<
T> ? -
final
- autoExpandOnHover → bool
-
final
-
canDrop
→ CarpenterTreeDropAcceptance<
T> ? -
final
- controller → CarpenterTreeController?
-
final
-
cutIds
→ Set<
Object> -
Stable node ids that should use pending-cut presentation.
final
- dragActivation → CarpenterDragActivation
-
final
-
dragOperations
→ Set<
CarpenterDragOperation> -
Move/copy/link operations that nodes may initiate through drag and drop.
final
-
expandedIds
→ Set<
Object> -
final
-
filter
→ CarpenterTreeNodePredicate<
T> ? -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
iconBuilder
→ CarpenterTreeIconBuilder<
T> ? -
final
-
itemBuilder
→ CarpenterTreeNodeBuilder<
T> ? -
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- multipleSelectionBehavior → CollectionMultiSelectionBehavior
-
final
-
nodes
→ List<
CarpenterTreeNode< T> > -
final
-
onActivated
→ CarpenterTreeActivation<
T> ? -
final
-
onDrop
→ CarpenterTreeDropCallback<
T> ? -
final
- onExpansionChanged → CarpenterTreeExpansionChanged?
-
final
-
onRetryLoad
→ CarpenterTreeActivation<
T> ? -
final
- onSelectionChanged → CarpenterTreeSelectionChanged?
-
final
-
rowBuilder
→ CarpenterTreeRowBuilder<
T> ? -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollController → ScrollController?
-
final
-
selectedIds
→ Set<
Object> -
final
- selectionMode → CarpenterTreeSelectionMode
-
final
- semanticLabel → String
-
final
- tableRowContentPadding → bool
-
final
- tableRows → bool
-
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< CarpenterTreeView< 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