DraggableWidget constructor
DraggableWidget({
- Key? key,
- required Widget child,
- double horizontalSpace = 0,
- double verticalSpace = 0,
- AnchoringPosition initialPosition = AnchoringPosition.bottomRight,
- bool intialVisibility = true,
- double bottomMargin = 0,
- double topMargin = 0,
- double statusBarHeight = 24,
- double shadowBorderRadius = 10,
- DragController? dragController,
- double dragAnimationScale = 1.1,
- Duration touchDelay = Duration.zero,
- BoxShadow normalShadow = const BoxShadow(color: Colors.black38, offset: Offset(0, 4), blurRadius: 2),
- 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);