Skip to content

Commit a7ac05b

Browse files
author
github-actions
committed
[automated commit] lint format and import sort
1 parent b0ae50d commit a7ac05b

File tree

2 files changed

+9
-22
lines changed

2 files changed

+9
-22
lines changed

example/lib/pages/components/progress_example.dart

+5-19
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,7 @@ class ProgressExampleState extends State<ProgressExample> {
2828
SizedBox(
2929
height: 20,
3030
),
31-
Wrapper(
32-
stepsCompleted: 0,
33-
type: ZetaBarType.standard,
34-
isThin: false,
35-
stateChangeable: true),
31+
Wrapper(stepsCompleted: 0, type: ZetaBarType.standard, isThin: false, stateChangeable: true),
3632
SizedBox(
3733
height: 20,
3834
),
@@ -94,9 +90,7 @@ class _WrapperState extends State<Wrapper> {
9490

9591
void setLoading() {
9692
setState(() {
97-
type = type == ZetaBarType.buffering
98-
? ZetaBarType.standard
99-
: ZetaBarType.buffering;
93+
type = type == ZetaBarType.buffering ? ZetaBarType.standard : ZetaBarType.buffering;
10094
});
10195
}
10296

@@ -108,25 +102,17 @@ class _WrapperState extends State<Wrapper> {
108102
SizedBox(
109103
width: 400,
110104
child: ZetaProgressBar(
111-
progress: progress,
112-
rounded: widget.rounded,
113-
type: type,
114-
isThin: widget.isThin,
115-
label: widget.label),
105+
progress: progress, rounded: widget.rounded, type: type, isThin: widget.isThin, label: widget.label),
116106
),
117107
const SizedBox(width: 40),
118108
Row(
119109
mainAxisAlignment: MainAxisAlignment.center,
120110
children: [
121111
widget.type != ZetaBarType.indeterminate
122-
? FilledButton(
123-
onPressed: increasePercentage, child: Text("Increase"))
112+
? FilledButton(onPressed: increasePercentage, child: Text("Increase"))
124113
: Container(),
125114
const SizedBox(width: 40),
126-
widget.stateChangeable
127-
? FilledButton(
128-
onPressed: setLoading, child: Text("Start Buffering"))
129-
: Container()
115+
widget.stateChangeable ? FilledButton(onPressed: setLoading, child: Text("Start Buffering")) : Container()
130116
],
131117
)
132118
],

lib/src/components/progress/progress.dart

+4-3
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ abstract class ZetaProgress extends StatefulWidget {
1919
/// Super class for [ZetaProgressState]
2020
/// Defines functions that deal with state change of progress value and
2121
/// animation changing.
22-
abstract class ZetaProgressState<T extends ZetaProgress> extends State<T>
23-
with TickerProviderStateMixin {
22+
abstract class ZetaProgressState<T extends ZetaProgress> extends State<T> with TickerProviderStateMixin {
2423
/// Decimal progress value
2524
late double progress;
2625

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

0 commit comments

Comments
 (0)