@@ -2,20 +2,32 @@ part of '../styled_widget.dart';
2
2
3
3
// TODO: why extend text
4
4
class _StyledAnimatedTextContainer extends Text {
5
+ @override
5
6
final String data;
7
+ @override
6
8
final TextStyle ? style;
9
+ @override
7
10
final StrutStyle ? strutStyle;
11
+ @override
8
12
final TextAlign ? textAlign;
13
+ @override
9
14
final TextDirection ? textDirection;
15
+ @override
10
16
final Locale ? locale;
17
+ @override
11
18
final bool ? softWrap;
19
+ @override
12
20
final TextOverflow ? overflow;
21
+ @override
13
22
final double ? textScaleFactor;
23
+ @override
14
24
final int ? maxLines;
25
+ @override
15
26
final String ? semanticsLabel;
27
+ @override
16
28
final TextWidthBasis ? textWidthBasis;
17
29
18
- _StyledAnimatedTextContainer (
30
+ const _StyledAnimatedTextContainer (
19
31
this .data, {
20
32
this .locale,
21
33
this .maxLines,
@@ -45,7 +57,7 @@ class _StyledAnimatedTextContainer extends Text {
45
57
46
58
@override
47
59
Widget build (BuildContext context) {
48
- _StyledAnimatedModel ? animation =
60
+ final _StyledAnimatedModel ? animation =
49
61
_StyledInheritedAnimation .of (context)? .animation;
50
62
if (animation == null ) {
51
63
return super .build (context);
@@ -75,7 +87,7 @@ class _AnimatedText extends ImplicitlyAnimatedWidget {
75
87
/// Creates a container that animates its parameters implicitly.
76
88
///
77
89
/// The [curve] and [duration] arguments must not be null.
78
- _AnimatedText (
90
+ const _AnimatedText (
79
91
this .data, {
80
92
Key ? key,
81
93
this .locale,
@@ -109,12 +121,6 @@ class _AnimatedText extends ImplicitlyAnimatedWidget {
109
121
110
122
@override
111
123
_AnimatedTextState createState () => _AnimatedTextState ();
112
-
113
- @override
114
- void debugFillProperties (DiagnosticPropertiesBuilder properties) {
115
- super .debugFillProperties (properties);
116
- // TODO: denug variables
117
- }
118
124
}
119
125
120
126
class _AnimatedTextState extends AnimatedWidgetBaseState <_AnimatedText > {
@@ -131,21 +137,31 @@ class _AnimatedTextState extends AnimatedWidgetBaseState<_AnimatedText> {
131
137
132
138
@override
133
139
void forEachTween (TweenVisitor <dynamic > visitor) {
134
- _textScaleFactor = visitor (_textScaleFactor, widget.textScaleFactor,
135
- (dynamic value) => Tween <double >(begin: value as double ))
136
- as Tween <double >? ;
137
- _fontSize = visitor (_fontSize, widget.style? .fontSize,
138
- (dynamic value) => Tween <double >(begin: value as double ))
139
- as Tween <double >? ;
140
- _letterSpacing = visitor (_letterSpacing, widget.style? .letterSpacing,
141
- (dynamic value) => Tween <double >(begin: value as double ))
142
- as Tween <double >? ;
143
- _wordSpacing = visitor (_wordSpacing, widget.style? .wordSpacing,
144
- (dynamic value) => Tween <double >(begin: value as double ))
145
- as Tween <double >? ;
146
- _height = visitor (_height, widget.style? .height,
147
- (dynamic value) => Tween <double >(begin: value as double ))
148
- as Tween <double >? ;
140
+ _textScaleFactor = visitor (
141
+ _textScaleFactor,
142
+ widget.textScaleFactor,
143
+ (dynamic value) => Tween <double >(begin: value as double ),
144
+ ) as Tween <double >? ;
145
+ _fontSize = visitor (
146
+ _fontSize,
147
+ widget.style? .fontSize,
148
+ (dynamic value) => Tween <double >(begin: value as double ),
149
+ ) as Tween <double >? ;
150
+ _letterSpacing = visitor (
151
+ _letterSpacing,
152
+ widget.style? .letterSpacing,
153
+ (dynamic value) => Tween <double >(begin: value as double ),
154
+ ) as Tween <double >? ;
155
+ _wordSpacing = visitor (
156
+ _wordSpacing,
157
+ widget.style? .wordSpacing,
158
+ (dynamic value) => Tween <double >(begin: value as double ),
159
+ ) as Tween <double >? ;
160
+ _height = visitor (
161
+ _height,
162
+ widget.style? .height,
163
+ (dynamic value) => Tween <double >(begin: value as double ),
164
+ ) as Tween <double >? ;
149
165
_decorationThickness = visitor (
150
166
_decorationThickness,
151
167
widget.style? .decorationThickness,
0 commit comments