GestureAnimator class

Inheritance

Constructors

GestureAnimator({Key? key, Duration duration = const Duration(milliseconds: 150), VoidCallback? onTap, dynamic onTapDown(TapDownDetails details)?, dynamic onTapUp(TapUpDetails details)?, VoidCallback? onLongPress, bool triggerOnTapAfterAnimationComplete = false, Widget? child, double scaleSize = 0.9, double xOffset = 0, double yOffset = 0, double blurX = 0, double blurY = 0, double opacity = 1, double skewX = 0, double skewY = 0, double rotation = 0, int numberOfPlays = 1, Curve curve = Curves.linear, Future<void> hapticFeedback()?})
const

Properties

blurX double
The amount of x blur to apply on the gesture being triggered
final
blurY double
The amount of y blur to apply on the gesture being triggered
final
child Widget?
The widget below this widget in the tree.
final
curve Curve
The animation curve to play,
final
duration Duration
Adjust the animation speed
final
hapticFeedback → (Future<void> Function()?)
Haptic feedback on devices where supported, this allows the feedback to when the press happens as the onTap callback may be set to trigger only after the animation is complete if triggerOnTapAfterAnimationComplete is set
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
numberOfPlays int
the number of times the animation should play once triggered
final
onLongPress VoidCallback?
Called when the user long presses on this widget.
final
onTap VoidCallback?
Called when the user taps this widget.
final
onTapDown → (dynamic Function(TapDownDetails details)?)
Called when the user long presses on this widget.
final
onTapUp → (dynamic Function(TapUpDetails details)?)
Called when the user stops tapping on this widget.
final
opacity double
The amount of opacity to apply on the gesture being triggered
final
rotation double
The amount to rotate the widget on the gesture being triggered
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scaleSize double
The scale size change for the animation 1 being no change, 0.8 being smaller, 1.2 being bigger
final
skewX double
The amount of x skew to apply on the gesture being triggered
final
skewY double
The amount of y skew to apply on the gesture being triggered
final
triggerOnTapAfterAnimationComplete bool
Only trigger on the onTap callback once the animation has completed
final
xOffset double
The amount of x offset to apply on the gesture being triggered
final
yOffset double
The amount of y offset to apply on the gesture being triggered
final

Methods

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