DraggableWidget constructor

DraggableWidget(
  1. {Key? key,
  2. required Widget child,
  3. double horizontalSpace = 0,
  4. double verticalSpace = 0,
  5. AnchoringPosition initialPosition = AnchoringPosition.bottomRight,
  6. bool intialVisibility = true,
  7. double bottomMargin = 0,
  8. double topMargin = 0,
  9. double statusBarHeight = 24,
  10. double shadowBorderRadius = 10,
  11. DragController? dragController,
  12. double dragAnimationScale = 1.1,
  13. Duration touchDelay = Duration.zero,
  14. BoxShadow normalShadow = const BoxShadow(color: Colors.black38, offset: Offset(0, 4), blurRadius: 2),
  15. BoxShadow draggingShadow = const BoxShadow(color: Colors.black38, offset: Offset(0, 10), blurRadius: 10)}
)

Implementation

DraggableWidget({
  Key? key,
  required this.child,
  this.horizontalSpace = 0,
  this.verticalSpace = 0,
  this.initialPosition = AnchoringPosition.bottomRight,
  this.intialVisibility = true,
  this.bottomMargin = 0,
  this.topMargin = 0,
  this.statusBarHeight = 24,
  this.shadowBorderRadius = 10,
  this.dragController,
  this.dragAnimationScale = 1.1,
  this.touchDelay = Duration.zero,
  this.normalShadow = const BoxShadow(
    color: Colors.black38,
    offset: Offset(0, 4),
    blurRadius: 2,
  ),
  this.draggingShadow = const BoxShadow(
    color: Colors.black38,
    offset: Offset(0, 10),
    blurRadius: 10,
  ),
})  : assert(statusBarHeight >= 0),
      assert(horizontalSpace >= 0),
      assert(verticalSpace >= 0),
      assert(bottomMargin >= 0),
      super(key: key);