BadgeAnimation class

Constructors

BadgeAnimation.fade({bool toAnimate = true, Duration animationDuration = const Duration(milliseconds: 500), bool loopAnimation = false, Duration disappearanceFadeAnimationDuration = const Duration(milliseconds: 200), Curve curve = Curves.easeOutCubic, Curve colorChangeAnimationCurve = Curves.linear, Duration colorChangeAnimationDuration = Duration.zero})
const
BadgeAnimation.rotation({bool toAnimate = true, Duration animationDuration = const Duration(milliseconds: 500), bool loopAnimation = false, Duration disappearanceFadeAnimationDuration = const Duration(milliseconds: 200), Curve curve = Curves.elasticOut, Curve colorChangeAnimationCurve = Curves.linear, Duration colorChangeAnimationDuration = Duration.zero})
const
BadgeAnimation.scale({bool toAnimate = true, Duration animationDuration = const Duration(milliseconds: 500), bool loopAnimation = false, Duration disappearanceFadeAnimationDuration = const Duration(milliseconds: 200), Curve curve = Curves.easeOutCubic, Curve colorChangeAnimationCurve = Curves.linear, Duration colorChangeAnimationDuration = Duration.zero, bool appearanceDisappearanceFadeAnimationEnabled = true})
const
BadgeAnimation.size({bool toAnimate = true, Duration animationDuration = const Duration(milliseconds: 500), bool loopAnimation = false, Duration disappearanceFadeAnimationDuration = const Duration(milliseconds: 200), Curve curve = Curves.fastOutSlowIn, Axis? sizeTransitionAxis = Axis.horizontal, double? sizeTransitionAxisAlignment = 1.0, Curve colorChangeAnimationCurve = Curves.linear, Duration colorChangeAnimationDuration = Duration.zero, bool appearanceDisappearanceFadeAnimationEnabled = true})
const
BadgeAnimation.slide({bool toAnimate = true, Duration animationDuration = const Duration(milliseconds: 500), bool loopAnimation = false, Duration disappearanceFadeAnimationDuration = const Duration(milliseconds: 200), Curve curve = Curves.elasticOut, SlideTween? slideTransitionPositionTween = const SlideTween(begin: Offset(-0.5, 0.9), end: Offset(0.0, 0.0)), Curve colorChangeAnimationCurve = Curves.linear, Duration colorChangeAnimationDuration = Duration.zero})
const

Properties

animationDuration → Duration
Duration of the badge animations when the badgeContent changes. The default value is Duration(milliseconds: 500).
final
animationType → BadgeAnimationType
Type of the animation for badge The default value is BadgeAnimationType.slide.
final
appearanceDisappearanceFadeAnimationEnabled → bool
final
colorChangeAnimationCurve → Curve
Used only for changing color animation. The default value is Curves.linear
final
colorChangeAnimationDuration → Duration
Used only for changing color animation. The default value is Duration.zero, meaning that no animation will be applied to color change by default.
final
curve → Curve
Controls curve of the animation
final
disappearanceFadeAnimationDuration → Duration
Duration of the badge appearance and disappearance fade animations. Fade animation is created with AnimatedOpacity.
final
hashCode → int
The hash code for this object.
no setterinherited
loopAnimation → bool
Make it true to have infinite animation False to have animation only when badgeContent is changed The default value is false
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sizeTransitionAxis → Axis?
Used only for SizeTransition animation The default value is Axis.horizontal
final
sizeTransitionAxisAlignment → double?
Used only for SizeTransition animation The default value is 1.0
final
slideTransitionPositionTween → SlideTween?
Used only for SlideTransition animation The default value is SlideTween( begin: const Offset(-0.5, 0.9), end: const Offset(0.0, 0.0), );
final
toAnimate → bool
True to animate badge on badgeContent change. False to disable animation. Default value is true.
final

Methods

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