@@ -103,24 +103,26 @@ class _EmojiLineState extends State<EmojiLine> {
103103 borderRadius: BorderRadius .circular (32 ),
104104 ),
105105 child: Text (
106- 'Hello 😀😃😄😁😆😅😂🤣🥲🥹️😊😇🙂🙃😉😌 Sexy' ,
106+ trigger
107+ ? 'World 🧳🌂☂️🧵🪡🪢🪭🧶👓🕶🥽🥼🦺👔👖🧣 Effect'
108+ : 'Hello 😀😃😄😁😆😅😂🤣🥲🥹️😊😇🙂🙃😉😌 Sexy' ,
107109 style: TextStyle (
108110 color: Theme .of (context).colorScheme.onPrimaryContainer,
109111 ),
110112 )
111113 .roll (
112- 'World 🧳🌂☂️🧵🪡🪢🪭🧶👓🕶🥽🥼🦺👔👖🧣 Effect' ,
113114 tapeStrategy: const ConsistentSymbolTapeStrategy (4 ),
114115 tapeSlideDirection: TextTapeSlideDirection .alternating,
115- staggerTapes: false ,
116+ staggerTapes: true ,
116117 tapeCurve: Curves .easeInOutBack,
117118 widthCurve: Curves .easeOutQuart,
118119 symbolDistanceMultiplier: 2 ,
120+ staggerSoftness: 30 ,
121+ // clipBehavior: Clip.none,
119122 )
120123 .animate (
121124 trigger: trigger,
122- reverse: true ,
123- duration: const Duration (milliseconds: 1500 ),
125+ duration: const Duration (milliseconds: 2000 ),
124126 ),
125127 ),
126128 );
@@ -148,7 +150,6 @@ class _TagLineState extends State<TagLine> {
148150 'Build' ,
149151 'Code' ,
150152 ];
151- int lastTagLine = 0 ;
152153 int tagLine = 0 ;
153154
154155 late Timer timer;
@@ -159,7 +160,6 @@ class _TagLineState extends State<TagLine> {
159160 timer = Timer .periodic (
160161 Duration (milliseconds: (1800 * timeDilation).toInt ()), (timer) {
161162 setState (() {
162- lastTagLine = tagLine;
163163 tagLine = (tagLine + 1 ) % tagLines.length;
164164 });
165165 });
@@ -212,15 +212,14 @@ class _TagLineState extends State<TagLine> {
212212 ],
213213 ).createShader (rect),
214214 child: Text (
215- tagLines[lastTagLine ],
215+ tagLines[tagLine ],
216216 style: GoogleFonts .gloriaHallelujah ().copyWith (
217217 color: Colors .white,
218218 fontWeight: FontWeight .bold,
219219 fontSize: 56 ,
220220 ),
221221 )
222222 .roll (
223- tagLines[tagLine],
224223 symbolDistanceMultiplier: 2 ,
225224 tapeSlideDirection: TextTapeSlideDirection .down,
226225 tapeCurve: Curves .easeInOutCubic,
@@ -263,7 +262,6 @@ class _TranslationState extends State<Translation> {
263262 'Namaste' ,
264263 'Salaam' ,
265264 ];
266- int lastTranslation = 0 ;
267265 int translation = 0 ;
268266
269267 late Timer timer;
@@ -275,7 +273,6 @@ class _TranslationState extends State<Translation> {
275273 timer = Timer .periodic (
276274 Duration (milliseconds: (2000 * timeDilation).toInt ()), (timer) {
277275 setState (() {
278- lastTranslation = translation;
279276 translation = (translation + 1 ) % translations.length;
280277 });
281278 });
@@ -315,15 +312,14 @@ class _TranslationState extends State<Translation> {
315312 ],
316313 ).createShader (rect),
317314 child: Text (
318- translations[lastTranslation ],
315+ translations[translation ],
319316 style: GoogleFonts .sacramento ().copyWith (
320317 color: Colors .white,
321318 fontWeight: FontWeight .bold,
322319 fontSize: 56 ,
323320 ),
324321 )
325322 .roll (
326- translations[translation],
327323 symbolDistanceMultiplier: 2 ,
328324 tapeCurve: Curves .easeInOutBack,
329325 widthCurve: Curves .easeInOutQuart,
@@ -361,7 +357,6 @@ class LikeButton extends StatefulWidget {
361357}
362358
363359class _LikeButtonState extends State <LikeButton > {
364- int lastCounter = 19 ;
365360 int counter = 19 ;
366361 bool triggerShare = false ;
367362 int downloadIteration = 1 ;
@@ -378,7 +373,6 @@ class _LikeButtonState extends State<LikeButton> {
378373 child: InkWell (
379374 onTap: () {
380375 setState (() {
381- lastCounter = counter;
382376 counter++ ;
383377 });
384378 },
@@ -395,13 +389,12 @@ class _LikeButtonState extends State<LikeButton> {
395389 ),
396390 const SizedBox (width: 8 ),
397391 Text (
398- '${lastCounter }K' ,
392+ '${counter }K' ,
399393 style: GoogleFonts .robotoTextTheme ()
400394 .bodyMedium!
401395 .copyWith (color: Colors .white, fontSize: 16 ),
402396 )
403397 .roll (
404- '${counter }K' ,
405398 tapeStrategy: const AllSymbolsTapeStrategy (false ),
406399 symbolDistanceMultiplier: 2 ,
407400 clipBehavior: Clip .none,
@@ -453,13 +446,12 @@ class _LikeButtonState extends State<LikeButton> {
453446 ),
454447 const SizedBox (width: 8 ),
455448 Text (
456- 'Share' ,
449+ triggerShare ? 'Thanks!' : 'Share' ,
457450 style: GoogleFonts .robotoTextTheme ()
458451 .bodyMedium!
459452 .copyWith (color: Colors .white, fontSize: 16 ),
460453 )
461454 .roll (
462- 'Thanks!' ,
463455 tapeStrategy:
464456 const ConsistentSymbolTapeStrategy (0 , true ),
465457 symbolDistanceMultiplier: 2 ,
@@ -513,11 +505,6 @@ class _LikeButtonState extends State<LikeButton> {
513505 .copyWith (color: Colors .white, fontSize: 16 ),
514506 )
515507 .roll (
516- switch (downloadIteration) {
517- 1 => 'Downloading' ,
518- 2 => 'Downloaded' ,
519- _ => 'Download' ,
520- },
521508 tapeStrategy:
522509 const ConsistentSymbolTapeStrategy (0 , false ),
523510 symbolDistanceMultiplier: 2 ,
@@ -642,7 +629,6 @@ class _ColorPalettePageState extends State<ColorPalettePage> {
642629 ]
643630 };
644631
645- int lastPage = 0 ;
646632 int currentPage = 0 ;
647633 final PageController _pageController = PageController ();
648634
@@ -694,12 +680,11 @@ class _ColorPalettePageState extends State<ColorPalettePage> {
694680 colors: palettes.values.elementAt (currentPage),
695681 ).createShader (rect),
696682 child: Text (
697- palettes.keys.elementAt (lastPage ).toUpperCase (),
683+ palettes.keys.elementAt (currentPage ).toUpperCase (),
698684 style: const TextStyle (
699685 fontWeight: FontWeight .w700, color: Colors .white),
700686 )
701687 .roll (
702- palettes.keys.elementAt (currentPage).toUpperCase (),
703688 staggerSoftness: 6 ,
704689 reverseStaggerDirection: false ,
705690 tapeSlideDirection: TextTapeSlideDirection .down,
@@ -731,7 +716,6 @@ class _ColorPalettePageState extends State<ColorPalettePage> {
731716 itemCount: palettes.keys.length,
732717 onPageChanged: (int page) {
733718 setState (() {
734- lastPage = currentPage;
735719 currentPage = page;
736720 });
737721 },
0 commit comments