diff --git a/example/lib/pages/components/progress_example.dart b/example/lib/pages/components/progress_example.dart index 84167758..2158b5ee 100644 --- a/example/lib/pages/components/progress_example.dart +++ b/example/lib/pages/components/progress_example.dart @@ -28,11 +28,7 @@ class ProgressExampleState extends State { SizedBox( height: 20, ), - Wrapper( - stepsCompleted: 0, - type: ZetaBarType.standard, - isThin: false, - stateChangeable: true), + Wrapper(stepsCompleted: 0, type: ZetaBarType.standard, isThin: false, stateChangeable: true), SizedBox( height: 20, ), @@ -94,9 +90,7 @@ class _WrapperState extends State { void setLoading() { setState(() { - type = type == ZetaBarType.buffering - ? ZetaBarType.standard - : ZetaBarType.buffering; + type = type == ZetaBarType.buffering ? ZetaBarType.standard : ZetaBarType.buffering; }); } @@ -108,25 +102,17 @@ class _WrapperState extends State { SizedBox( width: 400, child: ZetaProgressBar( - progress: progress, - rounded: widget.rounded, - type: type, - isThin: widget.isThin, - label: widget.label), + progress: progress, rounded: widget.rounded, type: type, isThin: widget.isThin, label: widget.label), ), const SizedBox(width: 40), Row( mainAxisAlignment: MainAxisAlignment.center, children: [ widget.type != ZetaBarType.indeterminate - ? FilledButton( - onPressed: increasePercentage, child: Text("Increase")) + ? FilledButton(onPressed: increasePercentage, child: Text("Increase")) : Container(), const SizedBox(width: 40), - widget.stateChangeable - ? FilledButton( - onPressed: setLoading, child: Text("Start Buffering")) - : Container() + widget.stateChangeable ? FilledButton(onPressed: setLoading, child: Text("Start Buffering")) : Container() ], ) ], diff --git a/lib/src/components/progress/progress.dart b/lib/src/components/progress/progress.dart index 40503d2d..3ad63440 100644 --- a/lib/src/components/progress/progress.dart +++ b/lib/src/components/progress/progress.dart @@ -19,8 +19,7 @@ abstract class ZetaProgress extends StatefulWidget { /// Super class for [ZetaProgressState] /// Defines functions that deal with state change of progress value and /// animation changing. -abstract class ZetaProgressState extends State - with TickerProviderStateMixin { +abstract class ZetaProgressState extends State with TickerProviderStateMixin { /// Decimal progress value late double progress; @@ -35,7 +34,9 @@ abstract class ZetaProgressState extends State super.initState(); progress = widget.progress; controller = AnimationController( - vsync: this, duration: const Duration(milliseconds: 200),); + vsync: this, + duration: const Duration(milliseconds: 200), + ); animation = Tween( begin: widget.progress, // Start value end: widget.progress, // End value (initially same as start value)