CardSwipeTransforms class
Model class for storing card transformation properties used in card swipe animations.
This class encapsulates the visual transform properties needed to create smooth rolling animations between mailbox cards during swipe interactions.
Constructors
- CardSwipeTransforms.new({required double offsetX, required double offsetY, required double scale, required double opacity, double rotation = 0.0})
-
const
- CardSwipeTransforms.combined({required double progress, double maxOpacity = 1.0, double minOpacity = 0.0, double maxScale = 1.0, double minScale = 0.8, double maxRotation = 0.0, double minRotation = -0.1})
-
Creates a transform with combined effects (fade + scale + rotation)
factory
- CardSwipeTransforms.fade({required double progress, double maxOpacity = 1.0, double minOpacity = 0.0})
-
Creates a transform with fade effect based on swipe progress
factory
- CardSwipeTransforms.identity()
-
Creates a default transform with no modifications
factory
- CardSwipeTransforms.rolling({required double progress, required double cardWidth, required double cardSpacing})
-
Creates a transform for rolling animation based on swipe progress
factory
- CardSwipeTransforms.rotate({required double progress, double maxRotation = 0.0, double minRotation = -0.1})
-
Creates a transform with rotation effect based on swipe progress
factory
- CardSwipeTransforms.scale({required double progress, double maxScale = 1.0, double minScale = 0.8})
-
Creates a transform with scale effect based on swipe progress
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- offsetX → double
-
Horizontal offset for card positioning
final
- offsetY → double
-
Vertical offset for card positioning
final
- opacity → double
-
Opacity level for card visibility (0.0 to 1.0)
final
- rotation → double
-
Rotation angle in radians
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scale → double
-
Scale factor for card size (0.0 to 1.0+)
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited