mirror of
https://github.com/wger-project/flutter.git
synced 2026-02-18 00:17:48 +01:00
dart formating
This commit is contained in:
@@ -135,7 +135,7 @@ class _GymModeState extends ConsumerState<GymMode> {
|
|||||||
final routinesProvider = context.read<RoutinesProvider>();
|
final routinesProvider = context.read<RoutinesProvider>();
|
||||||
var currentElement = 1;
|
var currentElement = 1;
|
||||||
final List<Widget> out = [];
|
final List<Widget> out = [];
|
||||||
|
|
||||||
for (final slotData in widget._dayDataGym.slots) {
|
for (final slotData in widget._dayDataGym.slots) {
|
||||||
var firstPage = true;
|
var firstPage = true;
|
||||||
for (final config in slotData.setConfigs) {
|
for (final config in slotData.setConfigs) {
|
||||||
@@ -150,11 +150,11 @@ class _GymModeState extends ConsumerState<GymMode> {
|
|||||||
exercise,
|
exercise,
|
||||||
ratioCompleted,
|
ratioCompleted,
|
||||||
state.exercisePages,
|
state.exercisePages,
|
||||||
_totalPages
|
_totalPages,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
out.add(
|
out.add(
|
||||||
LogPage(
|
LogPage(
|
||||||
_controller,
|
_controller,
|
||||||
@@ -165,7 +165,7 @@ class _GymModeState extends ConsumerState<GymMode> {
|
|||||||
ratioCompleted,
|
ratioCompleted,
|
||||||
state.exercisePages,
|
state.exercisePages,
|
||||||
_totalPages,
|
_totalPages,
|
||||||
widget._iteration
|
widget._iteration,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -177,7 +177,7 @@ class _GymModeState extends ConsumerState<GymMode> {
|
|||||||
config.restTime!.toInt(),
|
config.restTime!.toInt(),
|
||||||
ratioCompleted,
|
ratioCompleted,
|
||||||
state.exercisePages,
|
state.exercisePages,
|
||||||
_totalPages
|
_totalPages,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -86,24 +86,25 @@ class NavigationHeader extends StatelessWidget {
|
|||||||
this._title,
|
this._title,
|
||||||
this._controller,
|
this._controller,
|
||||||
this._totalPages, {
|
this._totalPages, {
|
||||||
required this.exercisePages,
|
required this.exercisePages,
|
||||||
this.hideEndWorkoutButton = false
|
this.hideEndWorkoutButton = false,
|
||||||
});
|
});
|
||||||
|
|
||||||
Widget getDialog(BuildContext context) {
|
Widget getDialog(BuildContext context) {
|
||||||
final TextButton? endWorkoutButton = !hideEndWorkoutButton ?
|
final TextButton? endWorkoutButton = !hideEndWorkoutButton
|
||||||
TextButton(
|
? TextButton(
|
||||||
child: Text(AppLocalizations.of(context).endWorkout),
|
child: Text(AppLocalizations.of(context).endWorkout),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
_controller.animateToPage(
|
_controller.animateToPage(
|
||||||
_totalPages,
|
_totalPages,
|
||||||
duration: DEFAULT_ANIMATION_DURATION,
|
duration: DEFAULT_ANIMATION_DURATION,
|
||||||
curve: DEFAULT_ANIMATION_CURVE,
|
curve: DEFAULT_ANIMATION_CURVE,
|
||||||
);
|
);
|
||||||
|
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
},
|
},
|
||||||
) : null;
|
)
|
||||||
|
: null;
|
||||||
|
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
title: Text(
|
title: Text(
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ class SessionPage extends StatelessWidget {
|
|||||||
this._routine,
|
this._routine,
|
||||||
this._controller,
|
this._controller,
|
||||||
TimeOfDay start,
|
TimeOfDay start,
|
||||||
this._exercisePages,
|
this._exercisePages,
|
||||||
this._totalElements, {
|
this._totalElements, {
|
||||||
int? dayId,
|
int? dayId,
|
||||||
}) : _session = _routine.sessions
|
}) : _session = _routine.sessions
|
||||||
|
|||||||
@@ -30,12 +30,7 @@ class TimerWidget extends StatefulWidget {
|
|||||||
final Map<Exercise, int> _exercisePages;
|
final Map<Exercise, int> _exercisePages;
|
||||||
final _totalPages;
|
final _totalPages;
|
||||||
|
|
||||||
const TimerWidget(
|
const TimerWidget(this._controller, this._ratioCompleted, this._exercisePages, this._totalPages);
|
||||||
this._controller,
|
|
||||||
this._ratioCompleted,
|
|
||||||
this._exercisePages,
|
|
||||||
this._totalPages
|
|
||||||
);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_TimerWidgetState createState() => _TimerWidgetState();
|
_TimerWidgetState createState() => _TimerWidgetState();
|
||||||
@@ -103,7 +98,7 @@ class TimerCountdownWidget extends StatefulWidget {
|
|||||||
this._seconds,
|
this._seconds,
|
||||||
this._ratioCompleted,
|
this._ratioCompleted,
|
||||||
this._exercisePages,
|
this._exercisePages,
|
||||||
this._totalPages
|
this._totalPages,
|
||||||
);
|
);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
Reference in New Issue
Block a user