@@ -34,6 +34,7 @@ import 'package:badgemagic/badge_animation/ani_diagonal.dart';
34
34
import 'package:badgemagic/badge_animation/ani_emergency.dart' ;
35
35
import 'package:badgemagic/badge_animation/ani_beating_hearts.dart' ;
36
36
import 'package:badgemagic/badge_animation/ani_fireworks.dart' ;
37
+ import 'package:badgemagic/badge_animation/ani_equalizer.dart' ; // new import of EqualizerAnimation
37
38
38
39
Map <int , BadgeAnimation ?> animationMap = {
39
40
0 : LeftAnimation (),
@@ -56,6 +57,7 @@ Map<int, BadgeAnimation?> animationMap = {
56
57
17 : EmergencyAnimation (), // Emergency
57
58
18 : BeatingHeartsAnimation (), // Beating Hearts
58
59
19 : FireworksAnimation (), // Fireworks
60
+ 20 : EqualizerAnimation (), // Digital Rain
59
61
};
60
62
61
63
Map <int , BadgeEffect > effectMap = {
@@ -85,8 +87,8 @@ class AnimationBadgeProvider extends ChangeNotifier {
85
87
// Helper: returns true if a special animation (custom) is selected
86
88
bool isSpecialAnimationSelected () {
87
89
int idx = getAnimationIndex () ?? 0 ;
88
- // Add all special animation indices here (including Fireworks at 19 ):
89
- return [9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 , 17 , 18 , 19 ].contains (idx);
90
+ // Add all special animation indices here (including Equalizer at 20 ):
91
+ return [9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 , 17 , 18 , 19 , 20 ].contains (idx);
90
92
}
91
93
92
94
// Call this to reset to text animation (LeftAnimation)
@@ -98,7 +100,8 @@ class AnimationBadgeProvider extends ChangeNotifier {
98
100
void calculateDuration (int speed) {
99
101
int idx = getAnimationIndex () ?? 0 ;
100
102
int newSpeed;
101
- if (idx == 9 || idx == 10 || idx == 11 || idx == 12 ) {
103
+ if (idx == 9 || idx == 10 || idx == 11 || idx == 12 || idx == 20 ) {
104
+ //added EqualizerAnimation
102
105
// Use slower mapping for custom animations
103
106
// (aniSpeedStrategy already uses the slower mapping if you want, or you can hardcode)
104
107
newSpeed = aniSpeedStrategy (speed - 1 ); // keep as is, or adjust if needed
@@ -292,6 +295,8 @@ class AnimationBadgeProvider extends ChangeNotifier {
292
295
await transferBeatingHeartsAnimation (badgeData, selectedSpeed);
293
296
} else if (aniIndex == 19 ) {
294
297
await transferFireworksAnimation (badgeData, selectedSpeed);
298
+ } else if (aniIndex == 20 ) {
299
+ await transferEqualizerAnimation (badgeData, selectedSpeed);
295
300
} else {
296
301
await badgeData.checkAndTransfer (
297
302
inlineImageProvider.getController ().text,
0 commit comments