SortableDragHandle constructor
const
SortableDragHandle({
- Key? key,
- required Widget child,
- bool enabled = true,
- HitTestBehavior? behavior,
- MouseCursor? cursor,
Creates a SortableDragHandle for initiating drag operations.
Configures a dedicated drag handle that can initiate drag operations for its parent sortable widget. The handle provides visual feedback and can be independently enabled or disabled.
Parameters:
key(Key?): Widget identifier for the widget treechild(Widget, required): The widget that serves as the drag handleenabled(bool, default: true): Whether drag operations are enabledbehavior(HitTestBehavior?, optional): Hit test behavior for gesturescursor(MouseCursor?, optional): Mouse cursor when hovering
Example:
SortableDragHandle(
enabled: isDragEnabled,
cursor: SystemMouseCursors.move,
child: Container(
padding: EdgeInsets.all(8),
child: Icon(Icons.drag_indicator),
),
)
Implementation
const SortableDragHandle(
{super.key,
required this.child,
this.enabled = true,
this.behavior,
this.cursor});