@@ -81,29 +81,28 @@ public override State createState() {
81
81
}
82
82
}
83
83
84
- public class _StepperState : TickerProviderStateMixin < Stepper > {
85
- readonly TextStyle _kStepStyleLight = new TextStyle (
84
+ class _StepperState : TickerProviderStateMixin < Stepper > {
85
+ static readonly TextStyle _kStepStyleLight = new TextStyle (
86
86
fontSize : 12.0f ,
87
87
color : Colors . white
88
88
) ;
89
89
90
- readonly TextStyle _kStepStyleDark = new TextStyle (
90
+ static readonly TextStyle _kStepStyleDark = new TextStyle (
91
91
fontSize : 12.0f ,
92
92
color : Colors . black87
93
93
) ;
94
94
95
- readonly Color _kErrorLight = Colors . red ;
96
- readonly Color _kErrorDark = Colors . red . shade400 ;
97
- readonly Color _kCircleActiveLight = Colors . white ;
98
- readonly Color _kCircleActiveDark = Colors . black87 ;
99
- readonly Color _kDisabledLight = Colors . black38 ;
100
- readonly Color _kDisabledDark = Colors . white30 ;
101
- readonly float _kStepSize = 24.0f ;
102
- readonly float _kTriangleHeight = 24.0f * 0.866025f ;
95
+ static readonly Color _kErrorLight = Colors . red ;
96
+ static readonly Color _kErrorDark = Colors . red . shade400 ;
97
+ static readonly Color _kCircleActiveLight = Colors . white ;
98
+ static readonly Color _kCircleActiveDark = Colors . black87 ;
99
+ static readonly Color _kDisabledLight = Colors . black38 ;
100
+ static readonly Color _kDisabledDark = Colors . white30 ;
101
+ static readonly float _kStepSize = 24.0f ;
102
+ static readonly float _kTriangleHeight = 24.0f * 0.866025f ;
103
103
104
104
List < GlobalKey > _keys ;
105
- public Dictionary < int , StepState > _oldStates = new Dictionary < int , StepState > ( ) ;
106
-
105
+ Dictionary < int , StepState > _oldStates = new Dictionary < int , StepState > ( ) ;
107
106
108
107
public override void initState ( ) {
109
108
base . initState ( ) ;
@@ -157,24 +156,24 @@ Widget _buildCircleChild(int index, bool oldState) {
157
156
case StepState . disabled :
158
157
return new Text (
159
158
( index + 1 ) . ToString ( ) ,
160
- style : isDarkActive ? this . _kStepStyleDark : this . _kStepStyleLight
159
+ style : isDarkActive ? _kStepStyleDark : _kStepStyleLight
161
160
) ;
162
161
case StepState . editing :
163
162
return new Icon (
164
163
Icons . edit ,
165
- color : isDarkActive ? this . _kCircleActiveDark : this . _kCircleActiveLight ,
164
+ color : isDarkActive ? _kCircleActiveDark : _kCircleActiveLight ,
166
165
size : 18.0f
167
166
) ;
168
167
case StepState . complete :
169
168
return new Icon (
170
169
Icons . check ,
171
- color : isDarkActive ? this . _kCircleActiveDark : this . _kCircleActiveLight ,
170
+ color : isDarkActive ? _kCircleActiveDark : _kCircleActiveLight ,
172
171
size : 18.0f
173
172
) ;
174
173
case StepState . error :
175
174
return new Text (
176
175
"!" ,
177
- style : this . _kStepStyleLight
176
+ style : _kStepStyleLight
178
177
) ;
179
178
}
180
179
@@ -194,8 +193,8 @@ Color _circleColor(int index) {
194
193
Widget _buildCircle ( int index , bool oldState ) {
195
194
return new Container (
196
195
margin : EdgeInsets . symmetric ( vertical : 8.0f ) ,
197
- width : this . _kStepSize ,
198
- height : this . _kStepSize ,
196
+ width : _kStepSize ,
197
+ height : _kStepSize ,
199
198
child : new AnimatedContainer (
200
199
curve : Curves . fastOutSlowIn ,
201
200
duration : ThemeUtils . kThemeAnimationDuration ,
@@ -215,15 +214,15 @@ Widget _buildCircle(int index, bool oldState) {
215
214
Widget _buildTriangle ( int index , bool oldState ) {
216
215
return new Container (
217
216
margin : EdgeInsets . symmetric ( vertical : 8.0f ) ,
218
- width : this . _kStepSize ,
219
- height : this . _kStepSize ,
217
+ width : _kStepSize ,
218
+ height : _kStepSize ,
220
219
child : new Center (
221
220
child : new SizedBox (
222
- width : this . _kStepSize ,
223
- height : this . _kTriangleHeight ,
221
+ width : _kStepSize ,
222
+ height : _kTriangleHeight ,
224
223
child : new CustomPaint (
225
224
painter : new _TrianglePainter (
226
- color : this . _isDark ( ) ? this . _kErrorDark : this . _kErrorLight ) ,
225
+ color : this . _isDark ( ) ? _kErrorDark : _kErrorLight ) ,
227
226
child : new Align (
228
227
alignment : new Alignment ( 0.0f , 0.8f ) ,
229
228
child : this . _buildCircleChild ( index ,
@@ -298,7 +297,7 @@ Widget _buildVerticalControls() {
298
297
child : new Text ( localizations . continueButtonLabel )
299
298
) ,
300
299
new Container (
301
- margin : EdgeInsets . only ( 8.0f ) , // EdgeInsetsDirection
300
+ margin : EdgeInsets . only ( 8.0f ) ,
302
301
child : new FlatButton (
303
302
onPressed : this . widget . onStepCancel ,
304
303
textColor : cancelColor ,
@@ -323,11 +322,11 @@ TextStyle _titleStyle(int index) {
323
322
return textTheme . body2 ;
324
323
case StepState . disabled :
325
324
return textTheme . body2 . copyWith (
326
- color : this . _isDark ( ) ? this . _kDisabledDark : this . _kDisabledLight
325
+ color : this . _isDark ( ) ? _kDisabledDark : _kDisabledLight
327
326
) ;
328
327
case StepState . error :
329
328
return textTheme . body2 . copyWith (
330
- color : this . _isDark ( ) ? this . _kErrorDark : this . _kErrorLight
329
+ color : this . _isDark ( ) ? _kErrorDark : _kErrorLight
331
330
) ;
332
331
}
333
332
@@ -345,11 +344,11 @@ TextStyle _subTitleStyle(int index) {
345
344
return textTheme . caption ;
346
345
case StepState . disabled :
347
346
return textTheme . caption . copyWith (
348
- color : this . _isDark ( ) ? this . _kDisabledDark : this . _kDisabledLight
347
+ color : this . _isDark ( ) ? _kDisabledDark : _kDisabledLight
349
348
) ;
350
349
case StepState . error :
351
350
return textTheme . caption . copyWith (
352
- color : this . _isDark ( ) ? this . _kErrorDark : this . _kErrorLight
351
+ color : this . _isDark ( ) ? _kErrorDark : _kErrorLight
353
352
) ;
354
353
}
355
354
@@ -400,7 +399,7 @@ Widget _buildVerticalHeader(int index) {
400
399
}
401
400
) ,
402
401
new Container (
403
- margin : EdgeInsets . only ( 12.0f ) , // EdgeInsetsDirectional
402
+ margin : EdgeInsets . only ( 12.0f ) ,
404
403
child : this . _buildheaderText ( index )
405
404
)
406
405
}
@@ -411,7 +410,7 @@ Widget _buildVerticalHeader(int index) {
411
410
Widget _buildVerticalBody ( int index ) {
412
411
return new Stack (
413
412
children : new List < Widget > {
414
- new Positioned ( // PositionedDirectional
413
+ new Positioned (
415
414
left : 24.0f ,
416
415
top : 0.0f ,
417
416
bottom : 0.0f ,
@@ -510,7 +509,7 @@ Widget _buildHorizontal() {
510
509
child : new Center ( child : this . _buildIcon ( _i ) )
511
510
) ,
512
511
new Container (
513
- margin : EdgeInsets . only ( left : 12.0f ) , // EdgeinsetsDirectional
512
+ margin : EdgeInsets . only ( left : 12.0f ) ,
514
513
child : this . _buildheaderText ( _i )
515
514
)
516
515
}
@@ -578,8 +577,7 @@ public override Widget build(BuildContext context) {
578
577
return this . _buildHorizontal ( ) ;
579
578
}
580
579
581
-
582
- return new Text ( "Build Failed" ) ;
580
+ return null ;
583
581
}
584
582
}
585
583
0 commit comments