We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7fdc94e commit 4951560Copy full SHA for 4951560
lib/badge_animation/ani_snowflake.dart
@@ -7,10 +7,13 @@ class SnowFlakeAnimation extends BadgeAnimation {
7
int newGridHeight = processGrid.length;
8
int newGridWidth = processGrid[0].length;
9
10
+ // Calculate the total number of frames based on overflow
11
int framesCount = (newGridWidth / badgeWidth).ceil();
12
13
+ // The current frame index
14
int currentFrame = animationIndex % framesCount;
15
16
+ // Always left-align: start at column 0 for each frame, but fetch the right slice from processGrid
17
int startCol = currentFrame * badgeWidth;
18
19
for (int i = 0; i < badgeHeight; i++) {
@@ -20,4 +23,4 @@ class SnowFlakeAnimation extends BadgeAnimation {
20
23
}
21
24
22
25
-}
26
+}
0 commit comments