canDrag property
Whether the enclosing row is draggable at all: the reorder policy's
canReorder answer for this row.
Public because it is how a caller renders a hidden grip that still reserves its cell, without asking its own policy a second time:
Builder(
builder: (context) {
final canDrag = TreeRowDragScope.maybeOf(context)?.canDrag ?? false;
return Visibility(
visible: canDrag,
maintainSize: true,
maintainAnimation: true,
maintainState: true,
child: TreeDragHandle(child: grip),
);
},
)
Visibility, not Opacity(opacity: 0.0): RenderOpacity does not
override hitTest, so a zero-alpha grip still swallows gestures.
Visibility's defaults (maintainInteractivity: false,
maintainSemantics: false) wrap the hidden cell in IgnorePointer
and ExcludeSemantics, which is what keeps the reserved cell inert.
Implementation
final bool canDrag;