AddToCartAnimation class Null safety

An add to cart animation which provide you an animation by sliding the product to cart in the Flutter app

Inheritance

Constructors

AddToCartAnimation({Key? key, required Widget child, required GlobalKey<CartIconKey> cartKey, required dynamic createAddToCartAnimation(Future<void> (GlobalKey<State<StatefulWidget>>)), double height = 30, double width = 30, double opacity = 0.85, JumpAnimationOptions jumpAnimation = const JumpAnimationOptions(), DragToCartAnimationOptions dragAnimation = const DragToCartAnimationOptions()})
const

Properties

cartKey GlobalKey<CartIconKey>
The Global Key of the AddToCartIcon element. We need it because we need to know where is the cart icon is located in the screen. Based on the location, we are dragging given widget to the cart.
final
child Widget
final
createAddToCartAnimation → dynamic Function(Future<void> (GlobalKey<State<StatefulWidget>>))
you can receive runAddToCartAnimation animation method on createAddToCartAnimation. runAddToCartAnimation animation method runs the add to cart animation based on the given parameters. Add to cart animation drags the given widget to the cart based on their location via global keys
final
dragAnimation DragToCartAnimationOptions
The animation options while given widget sliding to cart
final
hashCode int
The hash code for this object.
@nonVirtualread-onlyinherited
height double
What Should the given widget's height while dragging to the cart
final
jumpAnimation JumpAnimationOptions
Should the given widget jump before the dragging
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
opacity double
What Should the given widget's opacity while dragging to the cart
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
width double
What Should the given widget's width while dragging to the cart
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _AddToCartAnimationState
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.
@protectedinherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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.
@nonVirtualinherited