Skip to content

Commit

Permalink
[automated commit] lint format and import sort
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Feb 29, 2024
1 parent f6b2ad4 commit fc4f42c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 22 deletions.
24 changes: 5 additions & 19 deletions example/lib/pages/components/progress_example.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,7 @@ class ProgressExampleState extends State<ProgressExample> {
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,
),
Expand Down Expand Up @@ -94,9 +90,7 @@ class _WrapperState extends State<Wrapper> {

void setLoading() {
setState(() {
type = type == ZetaBarType.buffering
? ZetaBarType.standard
: ZetaBarType.buffering;
type = type == ZetaBarType.buffering ? ZetaBarType.standard : ZetaBarType.buffering;
});
}

Expand All @@ -108,25 +102,17 @@ class _WrapperState extends State<Wrapper> {
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()
],
)
],
Expand Down
7 changes: 4 additions & 3 deletions lib/src/components/progress/progress.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<T extends ZetaProgress> extends State<T>
with TickerProviderStateMixin {
abstract class ZetaProgressState<T extends ZetaProgress> extends State<T> with TickerProviderStateMixin {
/// Decimal progress value
late double progress;

Expand All @@ -35,7 +34,9 @@ abstract class ZetaProgressState<T extends ZetaProgress> extends State<T>
super.initState();
progress = widget.progress;
controller = AnimationController(
vsync: this, duration: const Duration(milliseconds: 200),);
vsync: this,
duration: const Duration(milliseconds: 200),
);
animation = Tween<double>(
begin: widget.progress, // Start value
end: widget.progress, // End value (initially same as start value)
Expand Down

0 comments on commit fc4f42c

Please sign in to comment.