ElementScope constructor
const
ElementScope({
- Key? key,
- required Widget child,
- required void onDragStart(
- DragStartDetails details
- required void onDragUpdate(
- DragUpdateDetails details
- required void onDragEnd(
- DragEndDetails details
- VoidCallback? onDragCancel,
- bool isDraggable = true,
- DragStartBehavior dragStartBehavior = DragStartBehavior.start,
- VoidCallback? onTap,
- VoidCallback? onDoubleTap,
- void onContextMenu(
- Offset globalPosition
- VoidCallback? onMouseEnter,
- VoidCallback? onMouseLeave,
- MouseCursor? cursor,
- HitTestBehavior hitTestBehavior = HitTestBehavior.opaque,
Creates an element scope with the specified interaction callbacks.
The onDragStart, onDragUpdate, and onDragEnd callbacks are required
and form the core drag lifecycle. Other callbacks are optional.
Implementation
const ElementScope({
super.key,
required this.child,
required this.onDragStart,
required this.onDragUpdate,
required this.onDragEnd,
this.onDragCancel,
this.isDraggable = true,
this.dragStartBehavior = DragStartBehavior.start,
this.onTap,
this.onDoubleTap,
this.onContextMenu,
this.onMouseEnter,
this.onMouseLeave,
this.cursor,
this.hitTestBehavior = HitTestBehavior.opaque,
});