SortableDragHandle constructor

const SortableDragHandle({
  1. Key? key,
  2. required Widget child,
  3. bool enabled = true,
  4. HitTestBehavior? behavior,
  5. 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 tree
  • child (Widget, required): The widget that serves as the drag handle
  • enabled (bool, default: true): Whether drag operations are enabled
  • behavior (HitTestBehavior?, optional): Hit test behavior for gestures
  • cursor (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});