@@ -23,7 +23,7 @@ class _TDProgressPageState extends State<TDProgressPage> {
2323 Timer ? _timer;
2424 bool isProgressing = false ;
2525 bool isPlaying = false ;
26- double microProgressValue = 0.0 ;
26+ double microProgressValue = 0.3 ;
2727 Timer ? _microTimer;
2828
2929 @override
@@ -129,25 +129,12 @@ class _TDProgressPageState extends State<TDProgressPage> {
129129
130130 @Demo (group: 'progress' )
131131 Widget _buildMicroButton (BuildContext context) {
132- return Row (
133- mainAxisAlignment: MainAxisAlignment .start,
134- children: [
135- TDProgress (
136- type: TDProgressType .micro,
137- value: microProgressValue,
138- onTap: _toggleMicroProgress,
139- label: TDIconLabel (isPlaying ? Icons .pause : Icons .play_arrow,
140- color: TDTheme .of (context).brandNormalColor),
141- ),
142- const SizedBox (width: 10 ),
143- TDProgress (
144- type: TDProgressType .micro,
145- value: microProgressValue,
146- onTap: _resetMicroProgress,
147- label: TDIconLabel (Icons .stop,
148- color: TDTheme .of (context).brandNormalColor),
149- ),
150- ],
132+ return TDProgress (
133+ type: TDProgressType .micro,
134+ value: microProgressValue,
135+ onTap: _toggleMicroProgress,
136+ label: TDIconLabel (isPlaying ? Icons .pause : Icons .play_arrow,
137+ color: TDTheme .of (context).brandNormalColor),
151138 );
152139 }
153140
@@ -281,12 +268,4 @@ class _TDProgressPageState extends State<TDProgressPage> {
281268 _microTimer? .cancel ();
282269 }
283270 }
284-
285- void _resetMicroProgress () {
286- _microTimer? .cancel ();
287- setState (() {
288- isPlaying = false ;
289- microProgressValue = 0.0 ;
290- });
291- }
292271}
0 commit comments