dart formating

This commit is contained in:
Arthur De Neyer
2025-10-13 23:41:40 +02:00
parent 354a8c381c
commit bc8b8fea31
4 changed files with 24 additions and 28 deletions

View File

@@ -135,7 +135,7 @@ class _GymModeState extends ConsumerState<GymMode> {
final routinesProvider = context.read<RoutinesProvider>();
var currentElement = 1;
final List<Widget> out = [];
for (final slotData in widget._dayDataGym.slots) {
var firstPage = true;
for (final config in slotData.setConfigs) {
@@ -150,11 +150,11 @@ class _GymModeState extends ConsumerState<GymMode> {
exercise,
ratioCompleted,
state.exercisePages,
_totalPages
_totalPages,
),
);
}
out.add(
LogPage(
_controller,
@@ -165,7 +165,7 @@ class _GymModeState extends ConsumerState<GymMode> {
ratioCompleted,
state.exercisePages,
_totalPages,
widget._iteration
widget._iteration,
),
);
@@ -177,7 +177,7 @@ class _GymModeState extends ConsumerState<GymMode> {
config.restTime!.toInt(),
ratioCompleted,
state.exercisePages,
_totalPages
_totalPages,
),
);
} else {

View File

@@ -86,24 +86,25 @@ class NavigationHeader extends StatelessWidget {
this._title,
this._controller,
this._totalPages, {
required this.exercisePages,
this.hideEndWorkoutButton = false
required this.exercisePages,
this.hideEndWorkoutButton = false,
});
Widget getDialog(BuildContext context) {
final TextButton? endWorkoutButton = !hideEndWorkoutButton ?
TextButton(
child: Text(AppLocalizations.of(context).endWorkout),
onPressed: () {
_controller.animateToPage(
_totalPages,
duration: DEFAULT_ANIMATION_DURATION,
curve: DEFAULT_ANIMATION_CURVE,
);
Navigator.of(context).pop();
},
) : null;
final TextButton? endWorkoutButton = !hideEndWorkoutButton
? TextButton(
child: Text(AppLocalizations.of(context).endWorkout),
onPressed: () {
_controller.animateToPage(
_totalPages,
duration: DEFAULT_ANIMATION_DURATION,
curve: DEFAULT_ANIMATION_CURVE,
);
Navigator.of(context).pop();
},
)
: null;
return AlertDialog(
title: Text(

View File

@@ -37,7 +37,7 @@ class SessionPage extends StatelessWidget {
this._routine,
this._controller,
TimeOfDay start,
this._exercisePages,
this._exercisePages,
this._totalElements, {
int? dayId,
}) : _session = _routine.sessions

View File

@@ -30,12 +30,7 @@ class TimerWidget extends StatefulWidget {
final Map<Exercise, int> _exercisePages;
final _totalPages;
const TimerWidget(
this._controller,
this._ratioCompleted,
this._exercisePages,
this._totalPages
);
const TimerWidget(this._controller, this._ratioCompleted, this._exercisePages, this._totalPages);
@override
_TimerWidgetState createState() => _TimerWidgetState();
@@ -103,7 +98,7 @@ class TimerCountdownWidget extends StatefulWidget {
this._seconds,
this._ratioCompleted,
this._exercisePages,
this._totalPages
this._totalPages,
);
@override