Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,6 @@ From left to right:<br>

[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!
9 changes: 6 additions & 3 deletions lib/src/badge.dart
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ class BadgeState extends State<Badge> with TickerProviderStateMixin {
parent: _animationController,
curve: widget.badgeAnimation.curve,
);
}

@override
Widget build(BuildContext context) {
if (widget.showBadge && widget.badgeAnimation.toAnimate) {
_animationController.forward();
_appearanceController.forward();
Expand All @@ -94,11 +97,11 @@ class BadgeState extends State<Badge> with TickerProviderStateMixin {
reverse: true,
);
}
} else {
_animationController.reset();
_appearanceController.reset();
}
}

@override
Widget build(BuildContext context) {
if (widget.child == null) {
return widget.ignorePointer
? IgnorePointer(child: _getBadge())
Expand Down
2 changes: 1 addition & 1 deletion lib/src/badge_animation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down