DynamicButtonAnimation class
Defines all animations used by DynamicButton.
This object centralizes animation configuration for:
- Selection changes
- Press effects
- Hover effects
- Focus transitions
- Indicator movement
Example:
DynamicButtonAnimation(
duration: Duration(milliseconds: 250),
curve: Curves.easeInOut,
pressScale: 0.96,
)
- Annotations
Constructors
- DynamicButtonAnimation({bool enabled = true, AnimationType type = AnimationType.scaleFade, Duration duration = const Duration(milliseconds: 200), Duration? reverseDuration, Curve curve = Curves.easeInOut, Curve? reverseCurve, double pressScale = 0.96, double hoverScale = 1.02, double selectedOpacity = 1.0, double unselectedOpacity = 1.0, double disabledOpacity = 0.5, Duration indicatorDuration = const Duration(milliseconds: 250), Curve indicatorCurve = Curves.easeInOut})
-
const
- DynamicButtonAnimation.cupertino()
-
Cupertino-style animation preset.
factory
- DynamicButtonAnimation.material()
-
Material-style animation preset.
factory
- DynamicButtonAnimation.none()
-
Disables all built-in animations.
factory
Properties
- curve → Curve
-
Forward animation curve.
final
- disabledOpacity → double
-
Opacity for disabled item.
final
- duration → Duration
-
Duration of implicit animations.
final
- enabled → bool
-
Enables all built-in animations.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hoverScale → double
-
Scale while hovering.
final
- indicatorCurve → Curve
-
Curve used by indicator animation.
final
- indicatorDuration → Duration
-
Duration of segmented indicator movement.
final
- pressScale → double
-
Scale while pressing.
final
- reverseCurve → Curve?
-
Reverse animation curve.
final
- reverseDuration → Duration?
-
Reverse duration.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedOpacity → double
-
Opacity for selected item.
final
- type → AnimationType
-
Built-in animation preset.
final
- unselectedOpacity → double
-
Opacity for unselected item.
final
Methods
-
copyWith(
{bool? enabled, AnimationType? type, Duration? duration, Duration? reverseDuration, Curve? curve, Curve? reverseCurve, double? pressScale, double? hoverScale, double? selectedOpacity, double? unselectedOpacity, double? disabledOpacity, Duration? indicatorDuration, Curve? indicatorCurve}) → DynamicButtonAnimation -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited