Skip to content

Commit

Permalink
fix: showBadge not respected when badgeAnimation is active
Browse files Browse the repository at this point in the history
  • Loading branch information
yadaniyil committed Dec 5, 2023
1 parent 029adab commit c3269be
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions lib/src/badge.dart
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,11 @@ class BadgeState extends State<Badge> with TickerProviderStateMixin {
}

double _getOpacity() {
if (!widget.badgeAnimation.toAnimate) {
if (!widget.showBadge) {
return 0.0;
}
return 1.0;
} else if (!widget
.badgeAnimation.appearanceDisappearanceFadeAnimationEnabled) {
if (!widget.showBadge) {
return 0.0;
}
if (!widget.badgeAnimation.toAnimate ||
!widget.badgeAnimation.appearanceDisappearanceFadeAnimationEnabled) {
return 1.0;
}
return _appearanceController.value;
Expand Down

0 comments on commit c3269be

Please sign in to comment.