Dragball class

Inheritance

Constructors

Dragball({Key? key, required Widget child, required Widget ball, required VoidCallback onTap, required DragballPosition initialPosition, required ValueChanged<DragballPosition> onPositionChanged, OnIconBallTapped? onIconBallTapped, DragballController? controller, double marginTopBottom = 150, bool withIcon = true, Widget? icon, double iconSize = 24, bool rotateIcon = true, Duration? animationSizeDuration, Curve? curveSizeAnimation, IconPosition iconPosition = IconPosition.center, bool scrollAndHide = true})
const

Properties

animationSizeDuration Duration?
Custom duration for size animation default duration: Duration(milliseconds: 200)
final
ball Widget
This widget for Custom your ball example with image make sure the size is the same as ballSize property
final
child Widget
Put your screen here example your Scaffold
final
controller DragballController?
final
curveSizeAnimation Curve?
CurvesSizeAnimation default curve: Curves.easeIn
final
hashCode int
The hash code for this object.
no setterinherited
icon Widget?
Custom icon for controll hide/show ball
final
iconPosition IconPosition
Use this property to set IconPosition the top, center, or bottom position of the icon. Default IconPostion is center
final
iconSize double
If you want custom icon size Change value with you want default icon size 24
final
initialPosition DragballPosition
initialPosition will be the location or display or configuration of the first position Dragball
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
marginTopBottom double
Custom Margin top bottom Ball would not be in that position default marginTopBottom: 150
final
onIconBallTapped OnIconBallTapped?
This function will called when icon is tapped / pressed default when tapped icon is show / hide ball If you need show / close ball this function will help you
final
onPositionChanged ValueChanged<DragballPosition>
this function will return the value of DragballPosition every time the position changes
final
onTap VoidCallback
This function will be called when the ball is pressed
final
rotateIcon bool
if you don't want any icon rotation animation on ball in hide or show, change this property to false default true
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollAndHide bool
if you don't want size animation when user scrolls, set this property value to false Default true
final
withIcon bool
If you don't want to show ball with icon, Change value to false defaultwithIcon: true
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _DragballState
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}) 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