Skip to content

Commit 6b91449

Browse files
committed
🔧 Update Pack 2 #22
1 parent ea6b415 commit 6b91449

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

lib/src/effect_widget.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class _EffectWidgetState extends State<EffectWidget> {
4747
/// caches the previous animation value to use in didUpdateWidget
4848
/// to calculate the begin value. This is used to create a smooth transition
4949
/// between two [Effect]s when the [Effect] changes mid animation.
50-
late double previousAnimationValue = 0;
50+
double previousAnimationValue = 0;
5151

5252
@override
5353
void initState() {

lib/src/effects/roll/rolling_text_controller.dart

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,14 @@ class RollingTextController with ChangeNotifier {
116116
/// A list containing strings that represent a tape of characters
117117
/// to roll through for each character index between the old and
118118
/// new text.
119-
late final List<String> tapes = [];
119+
final List<String> tapes = [];
120120

121121
/// A list containing painters that represent each tape of characters
122122
/// from [tapes].
123-
late final List<TextPainter> tapePainters = [];
123+
final List<TextPainter> tapePainters = [];
124124

125125
/// A cached map of tape heights for each tape painter.
126-
late final Map<int, double> tapeHeights = {};
126+
final Map<int, double> tapeHeights = {};
127127

128128
/// Returns the height of a tape at the given index.
129129
double getTapeHeight(int tapeIndex) => tapeHeights[tapeIndex] ?? 0;
@@ -237,7 +237,8 @@ class RollingTextController with ChangeNotifier {
237237

238238
tapes.add(switch (tapeSlideDirection) {
239239
TextTapeSlideDirection.up => tape,
240-
TextTapeSlideDirection.down => tape.characters.toList().reversed.join(''),
240+
TextTapeSlideDirection.down =>
241+
tape.characters.toList().reversed.join(''),
241242
TextTapeSlideDirection.alternating =>
242243
i % 2 == 1 ? tape : tape.characters.toList().reversed.join(''),
243244
TextTapeSlideDirection.random => Random('$i'.hashCode).nextBool()

0 commit comments

Comments
 (0)