TreeDragHandle class

Arms child as a drag handle for the row that encloses it.

Draws NOTHING. The appearance, the size, and the position are entirely the caller's; this widget contributes a pointer-down listener and a grab cursor and nothing else.

Starts the drag IMMEDIATELY, once the pointer moves past the touch slop, which is the pointer convention for a dedicated grip. Wrapping a WHOLE row in this is a trap: an immediate multi-drag over the full row claims every pointer that lands on it and the list stops scrolling. Use TreeDelayedDragHandle for that, or leave TreeReorderConfig.buildDefaultDragHandles at its default and let the package install one.

Outside a reorderable tree this renders child bare, so a row cloned into the drag proxy overlay is inert rather than throwing.

Inheritance
Implementers

Constructors

TreeDragHandle({required Widget child, bool enabled = true, Key? key})
const

Properties

child → Widget
The widget the user grabs.
final
enabled → bool
A local narrowing, ANDed with the package's own canReorder answer. It can only ever narrow, never widen.
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

build(BuildContext context) → Widget
Describes the part of the user interface represented by this widget.
override
createElement() → StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
createRecognizer() → MultiDragGestureRecognizer
The gesture that starts a drag from this handle.
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