SliverReorderableTree<TKey, TData> class

Declarative drag-and-drop reorderable SliverTree.

Inheritance

Constructors

SliverReorderableTree({required TreeController<TKey, TData> controller, required TreeReorderController<TKey, TData> reorderController, required Widget nodeBuilder(BuildContext context, TKey nodeKey, int nodeDepth, ReorderableNodeWrapper wrap), int maxStickyDepth = 0, double indentPerDepth = 24.0, double draggedOpacity = 0.3, Color dropIndicatorColor = const Color(0xFF2196F3), double dropIndicatorThickness = 2.0, Key? key})
const

Properties

controller TreeController<TKey, TData>
The tree controller driving structural state and animations.
final
draggedOpacity double
Opacity applied to the source row while it is being dragged.
final
dropIndicatorColor Color
Color of the drop indicator line.
final
dropIndicatorThickness double
Thickness of the drop indicator line in logical pixels.
final
hashCode int
The hash code for this object.
no setterinherited
indentPerDepth double
Horizontal indent used per depth level when positioning the drop indicator. Should match the indent your nodeBuilder produces.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
maxStickyDepth int
See SliverTree.maxStickyDepth.
final
nodeBuilder Widget Function(BuildContext context, TKey nodeKey, int nodeDepth, ReorderableNodeWrapper wrap)
Builds each row. Wrap the row widget with wrap to enable dragging.
final
reorderController TreeReorderController<TKey, TData>
The reorder controller orchestrating the drag lifecycle.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<SliverReorderableTree<TKey, TData>>
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