File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -128,14 +128,13 @@ class _TextAnimationState extends State<TextAnimation> {
128128 color: const Color (0xFF272727 ),
129129 borderRadius: BorderRadius .circular (32 ),
130130 ),
131- child: const Text ('Hello😀😃😄😁😆😅😂🤣🥲🥹☺ ️😊😇🙂🙃😉😌Sexy' )
131+ child: const Text ('Hello😀😃😄😁😆😅😂🤣🥲🥹️😊😇🙂🙃😉😌Sexy' )
132132 .roll (
133- 'World🧳🌂☂️🧵🪡🪢🪭🧶👓🕶🥽🥼🦺👔👕 👖🧣Effect' ,
133+ 'World🧳🌂☂️🧵🪡🪢🪭🧶👓🕶🥽🥼🦺👔👖🧣Effect' ,
134134 tapeStrategy: const ConsistentSymbolTapeStrategy (4 ),
135135 tapeCurve: Curves .easeInOutQuart,
136136 widthCurve: Curves .easeOutQuart,
137137 symbolDistanceMultiplier: 2 ,
138- clipBehavior: Clip .none,
139138 )
140139 .animate (
141140 toggle: translation,
Original file line number Diff line number Diff line change @@ -188,7 +188,10 @@ class ConsistentSymbolTapeStrategy extends SymbolTapeStrategy {
188188 return a;
189189 }
190190 }
191- if (length <= 2 ) return tape;
191+ if (length <= 2 ) {
192+ final int halfDist = maxDistance ~ / 2 ;
193+ return a * (halfDist + 1 ) + b * (halfDist + 1 );
194+ }
192195
193196 final StringBuffer newKit = StringBuffer ();
194197
@@ -198,7 +201,7 @@ class ConsistentSymbolTapeStrategy extends SymbolTapeStrategy {
198201 final progress = maxDistance - distance;
199202 if (fromStart) {
200203 final int start = min (progress, maxIndex - 1 );
201- newKit.write (tape.characters.elementAt (1 + start ));
204+ newKit.write (tape.characters.elementAt (start + 1 ));
202205 // if (newKit.length >= maxDistance + 2) break;
203206 } else {
204207 final int end = max (maxIndex - progress, 1 );
You can’t perform that action at this time.
0 commit comments