ComDraggable constructor
const
ComDraggable({
- Key? key,
- required Widget child,
- required Size childSize,
- double initialRight = 0,
- double initialBottom = 0,
- bool draggable = true,
- bool snapToEdge = true,
- bool useSafeArea = true,
- EdgeInsets boundaryMargin = EdgeInsets.zero,
- Clip clipBehavior = Clip.none,
- Duration snapAnimationDuration = const Duration(milliseconds: 300),
- Curve snapAnimationCurve = Curves.easeOutCubic,
- ValueChanged<
Offset> ? onPositionChanged, - Widget builder(
- BuildContext context,
- Widget child,
- bool isDragging
Implementation
const ComDraggable({
super.key,
required this.child,
required this.childSize,
this.initialRight = 0,
this.initialBottom = 0,
this.draggable = true,
this.snapToEdge = true,
this.useSafeArea = true,
this.boundaryMargin = EdgeInsets.zero,
this.clipBehavior = Clip.none,
this.snapAnimationDuration = const Duration(milliseconds: 300),
this.snapAnimationCurve = Curves.easeOutCubic,
this.onPositionChanged,
this.builder,
});