DraggableWidget class

Inheritance

Constructors

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)})

Properties

bottomMargin double
The top bottom pargin to create the bottom boundary for the widget, for example if you have a BottomNavigationBar, then you may need to set the bottom boundary so that the draggable button can't get on top of the BottomNavigationBar
final
child Widget
The widget that will be displayed as dragging widget
final
dragAnimationScale double
How much should the DraggableWidget be scaled when it is being dragged, default to 1.1
final
dragController DragController?
A drag controller to show/hide or move the widget around the screen
final
draggingShadow BoxShadow
BoxShadow when the widget is being dragged
final
hashCode int
The hash code for this object.
no setterinherited
horizontalSpace double
The horizontal padding around the widget
final
initialPosition AnchoringPosition
Intial location of the widget, default to AnchoringPosition.bottomRight
final
intialVisibility bool
Intially should the widget be visible or not, default to true
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
normalShadow BoxShadow
BoxShadow when the widget is not being dragged, default to
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shadowBorderRadius double
Shadow's border radius for the draggable widget, default to 10
final
statusBarHeight double
Status bar's height, default to 24
final
topMargin double
The top bottom pargin to create the top boundary for the widget, for example if you have a AppBar, then you may need to set the bottom boundary so that the draggable button can't get on top of the AppBar
final
touchDelay Duration
Touch Delay Duration. Default value is zero. When set, drag operations will trigger after the duration.
final
verticalSpace double
The vertical padding around the widget
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _DraggableWidgetState
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited