DraggableWidget constructor
DraggableWidget({})
DraggableWidget constructor. Parameters:
- widget: the widget to be draggable.
- height: the height of the draggable widget.
- width: the width of the draggable widget.
- dragSpeed: the speed of dragging.
- initialPosition: the initial position of the draggable widget.
- left: optional left position for custom initial position.
- top: optional top position for custom initial position.
Implementation
DraggableWidget({
Key? key,
required this.widget,
required this.initialPosition,
required this.height,
required this.width,
this.dragSpeed = 2.0,
this.left,
this.top,
}) : super(key: key) {
_validateInput();
}