Skip to content

Commit 27f13ee

Browse files
Fix: Replace private state reference with generic State reference - somehow this change didn't make it from main (#2235)
1 parent f3bf999 commit 27f13ee

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

super_text_layout/example/lib/rainbow_builder.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class RainbowBuilder extends StatefulWidget {
1212
final Widget Function(BuildContext, Color) builder;
1313

1414
@override
15-
_RainbowBuilderState createState() => _RainbowBuilderState();
15+
State<RainbowBuilder> createState() => _RainbowBuilderState();
1616
}
1717

1818
class _RainbowBuilderState extends State<RainbowBuilder> with SingleTickerProviderStateMixin {

super_text_layout/example/lib/rainbow_character_supertext.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class CharacterRainbowSuperText extends StatefulWidget {
1212
final TextSpan text;
1313

1414
@override
15-
_CharacterRainbowSuperTextState createState() => _CharacterRainbowSuperTextState();
15+
State<CharacterRainbowSuperText> createState() => _CharacterRainbowSuperTextState();
1616
}
1717

1818
class _CharacterRainbowSuperTextState extends State<CharacterRainbowSuperText> with SingleTickerProviderStateMixin {
@@ -50,8 +50,8 @@ class _CharacterRainbowSuperTextState extends State<CharacterRainbowSuperText> w
5050
final textLength = widget.text.toPlainText().length;
5151
for (int i = 0; i < textLength; i += 1) {
5252
// Get the bounding rectangle for the character
53-
characterRects.add(textLayout.getCharacterBox(TextPosition(offset: i))?.toRect()
54-
?? Rect.fromLTRB(0, 0, 0, textLayout.estimatedLineHeight));
53+
characterRects.add(textLayout.getCharacterBox(TextPosition(offset: i))?.toRect() ??
54+
Rect.fromLTRB(0, 0, 0, textLayout.estimatedLineHeight));
5555
// Select a color for this character
5656
final colorWheelDegrees =
5757
((360.0 * (characterColors.length / textLength)) + _startingColor.value) % 360;

0 commit comments

Comments
 (0)