@@ -103,24 +103,26 @@ class _EmojiLineState extends State<EmojiLine> {
103
103
borderRadius: BorderRadius .circular (32 ),
104
104
),
105
105
child: Text (
106
- 'Hello 😀😃😄😁😆😅😂🤣🥲🥹️😊😇🙂🙃😉😌 Sexy' ,
106
+ trigger
107
+ ? 'World 🧳🌂☂️🧵🪡🪢🪭🧶👓🕶🥽🥼🦺👔👖🧣 Effect'
108
+ : 'Hello 😀😃😄😁😆😅😂🤣🥲🥹️😊😇🙂🙃😉😌 Sexy' ,
107
109
style: TextStyle (
108
110
color: Theme .of (context).colorScheme.onPrimaryContainer,
109
111
),
110
112
)
111
113
.roll (
112
- 'World 🧳🌂☂️🧵🪡🪢🪭🧶👓🕶🥽🥼🦺👔👖🧣 Effect' ,
113
114
tapeStrategy: const ConsistentSymbolTapeStrategy (4 ),
114
115
tapeSlideDirection: TextTapeSlideDirection .alternating,
115
- staggerTapes: false ,
116
+ staggerTapes: true ,
116
117
tapeCurve: Curves .easeInOutBack,
117
118
widthCurve: Curves .easeOutQuart,
118
119
symbolDistanceMultiplier: 2 ,
120
+ staggerSoftness: 30 ,
121
+ // clipBehavior: Clip.none,
119
122
)
120
123
.animate (
121
124
trigger: trigger,
122
- reverse: true ,
123
- duration: const Duration (milliseconds: 1500 ),
125
+ duration: const Duration (milliseconds: 2000 ),
124
126
),
125
127
),
126
128
);
@@ -148,7 +150,6 @@ class _TagLineState extends State<TagLine> {
148
150
'Build' ,
149
151
'Code' ,
150
152
];
151
- int lastTagLine = 0 ;
152
153
int tagLine = 0 ;
153
154
154
155
late Timer timer;
@@ -159,7 +160,6 @@ class _TagLineState extends State<TagLine> {
159
160
timer = Timer .periodic (
160
161
Duration (milliseconds: (1800 * timeDilation).toInt ()), (timer) {
161
162
setState (() {
162
- lastTagLine = tagLine;
163
163
tagLine = (tagLine + 1 ) % tagLines.length;
164
164
});
165
165
});
@@ -212,15 +212,14 @@ class _TagLineState extends State<TagLine> {
212
212
],
213
213
).createShader (rect),
214
214
child: Text (
215
- tagLines[lastTagLine ],
215
+ tagLines[tagLine ],
216
216
style: GoogleFonts .gloriaHallelujah ().copyWith (
217
217
color: Colors .white,
218
218
fontWeight: FontWeight .bold,
219
219
fontSize: 56 ,
220
220
),
221
221
)
222
222
.roll (
223
- tagLines[tagLine],
224
223
symbolDistanceMultiplier: 2 ,
225
224
tapeSlideDirection: TextTapeSlideDirection .down,
226
225
tapeCurve: Curves .easeInOutCubic,
@@ -263,7 +262,6 @@ class _TranslationState extends State<Translation> {
263
262
'Namaste' ,
264
263
'Salaam' ,
265
264
];
266
- int lastTranslation = 0 ;
267
265
int translation = 0 ;
268
266
269
267
late Timer timer;
@@ -275,7 +273,6 @@ class _TranslationState extends State<Translation> {
275
273
timer = Timer .periodic (
276
274
Duration (milliseconds: (2000 * timeDilation).toInt ()), (timer) {
277
275
setState (() {
278
- lastTranslation = translation;
279
276
translation = (translation + 1 ) % translations.length;
280
277
});
281
278
});
@@ -315,15 +312,14 @@ class _TranslationState extends State<Translation> {
315
312
],
316
313
).createShader (rect),
317
314
child: Text (
318
- translations[lastTranslation ],
315
+ translations[translation ],
319
316
style: GoogleFonts .sacramento ().copyWith (
320
317
color: Colors .white,
321
318
fontWeight: FontWeight .bold,
322
319
fontSize: 56 ,
323
320
),
324
321
)
325
322
.roll (
326
- translations[translation],
327
323
symbolDistanceMultiplier: 2 ,
328
324
tapeCurve: Curves .easeInOutBack,
329
325
widthCurve: Curves .easeInOutQuart,
@@ -361,7 +357,6 @@ class LikeButton extends StatefulWidget {
361
357
}
362
358
363
359
class _LikeButtonState extends State <LikeButton > {
364
- int lastCounter = 19 ;
365
360
int counter = 19 ;
366
361
bool triggerShare = false ;
367
362
int downloadIteration = 1 ;
@@ -378,7 +373,6 @@ class _LikeButtonState extends State<LikeButton> {
378
373
child: InkWell (
379
374
onTap: () {
380
375
setState (() {
381
- lastCounter = counter;
382
376
counter++ ;
383
377
});
384
378
},
@@ -395,13 +389,12 @@ class _LikeButtonState extends State<LikeButton> {
395
389
),
396
390
const SizedBox (width: 8 ),
397
391
Text (
398
- '${lastCounter }K' ,
392
+ '${counter }K' ,
399
393
style: GoogleFonts .robotoTextTheme ()
400
394
.bodyMedium!
401
395
.copyWith (color: Colors .white, fontSize: 16 ),
402
396
)
403
397
.roll (
404
- '${counter }K' ,
405
398
tapeStrategy: const AllSymbolsTapeStrategy (false ),
406
399
symbolDistanceMultiplier: 2 ,
407
400
clipBehavior: Clip .none,
@@ -453,13 +446,12 @@ class _LikeButtonState extends State<LikeButton> {
453
446
),
454
447
const SizedBox (width: 8 ),
455
448
Text (
456
- 'Share' ,
449
+ triggerShare ? 'Thanks!' : 'Share' ,
457
450
style: GoogleFonts .robotoTextTheme ()
458
451
.bodyMedium!
459
452
.copyWith (color: Colors .white, fontSize: 16 ),
460
453
)
461
454
.roll (
462
- 'Thanks!' ,
463
455
tapeStrategy:
464
456
const ConsistentSymbolTapeStrategy (0 , true ),
465
457
symbolDistanceMultiplier: 2 ,
@@ -513,11 +505,6 @@ class _LikeButtonState extends State<LikeButton> {
513
505
.copyWith (color: Colors .white, fontSize: 16 ),
514
506
)
515
507
.roll (
516
- switch (downloadIteration) {
517
- 1 => 'Downloading' ,
518
- 2 => 'Downloaded' ,
519
- _ => 'Download' ,
520
- },
521
508
tapeStrategy:
522
509
const ConsistentSymbolTapeStrategy (0 , false ),
523
510
symbolDistanceMultiplier: 2 ,
@@ -642,7 +629,6 @@ class _ColorPalettePageState extends State<ColorPalettePage> {
642
629
]
643
630
};
644
631
645
- int lastPage = 0 ;
646
632
int currentPage = 0 ;
647
633
final PageController _pageController = PageController ();
648
634
@@ -694,12 +680,11 @@ class _ColorPalettePageState extends State<ColorPalettePage> {
694
680
colors: palettes.values.elementAt (currentPage),
695
681
).createShader (rect),
696
682
child: Text (
697
- palettes.keys.elementAt (lastPage ).toUpperCase (),
683
+ palettes.keys.elementAt (currentPage ).toUpperCase (),
698
684
style: const TextStyle (
699
685
fontWeight: FontWeight .w700, color: Colors .white),
700
686
)
701
687
.roll (
702
- palettes.keys.elementAt (currentPage).toUpperCase (),
703
688
staggerSoftness: 6 ,
704
689
reverseStaggerDirection: false ,
705
690
tapeSlideDirection: TextTapeSlideDirection .down,
@@ -731,7 +716,6 @@ class _ColorPalettePageState extends State<ColorPalettePage> {
731
716
itemCount: palettes.keys.length,
732
717
onPageChanged: (int page) {
733
718
setState (() {
734
- lastPage = currentPage;
735
719
currentPage = page;
736
720
});
737
721
},
0 commit comments