diff --git a/README.md b/README.md
index 00ac902..fc5ee36 100644
--- a/README.md
+++ b/README.md
@@ -126,6 +126,6 @@ From left to right:
[Diagonal decoration](https://pub.dev/packages/diagonal_decoration)
-[Yako Yheme Switch](https://pub.dev/packages/yako_theme_switch)
+[Yako Theme Switch](https://pub.dev/packages/yako_theme_switch)
and more to come!
\ No newline at end of file
diff --git a/lib/src/badge.dart b/lib/src/badge.dart
index 7a13e8b..47bf9b7 100644
--- a/lib/src/badge.dart
+++ b/lib/src/badge.dart
@@ -83,7 +83,10 @@ class BadgeState extends State with TickerProviderStateMixin {
parent: _animationController,
curve: widget.badgeAnimation.curve,
);
+ }
+ @override
+ Widget build(BuildContext context) {
if (widget.showBadge && widget.badgeAnimation.toAnimate) {
_animationController.forward();
_appearanceController.forward();
@@ -94,11 +97,11 @@ class BadgeState extends State with TickerProviderStateMixin {
reverse: true,
);
}
+ } else {
+ _animationController.reset();
+ _appearanceController.reset();
}
- }
- @override
- Widget build(BuildContext context) {
if (widget.child == null) {
return widget.ignorePointer
? IgnorePointer(child: _getBadge())
diff --git a/lib/src/badge_animation.dart b/lib/src/badge_animation.dart
index 211c185..56aff13 100644
--- a/lib/src/badge_animation.dart
+++ b/lib/src/badge_animation.dart
@@ -138,7 +138,7 @@ class BadgeAnimation {
this.curve = Curves.easeOutCubic,
this.colorChangeAnimationCurve = Curves.linear,
this.colorChangeAnimationDuration = Duration.zero,
- this.appearanceDisappearanceFadeAnimationEnabled = true,
+ this.appearanceDisappearanceFadeAnimationEnabled = false,
}) : animationType = BadgeAnimationType.scale,
sizeTransitionAxis = null,
sizeTransitionAxisAlignment = null,