ComDraggable constructor

const ComDraggable({
  1. Key? key,
  2. required Widget child,
  3. required Size childSize,
  4. double initialRight = 0,
  5. double initialBottom = 0,
  6. bool draggable = true,
  7. bool snapToEdge = true,
  8. bool useSafeArea = true,
  9. EdgeInsets boundaryMargin = EdgeInsets.zero,
  10. Clip clipBehavior = Clip.none,
  11. Duration snapAnimationDuration = const Duration(milliseconds: 300),
  12. Curve snapAnimationCurve = Curves.easeOutCubic,
  13. ValueChanged<Offset>? onPositionChanged,
  14. Widget builder(
    1. BuildContext context,
    2. Widget child,
    3. 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,
});