@ -2849,6 +2849,17 @@ final class _CurrentStepPane extends StatelessWidget {
|
||||
),
|
||||
],
|
||||
const SizedBox(height: 4),
|
||||
if (step.type == ExerciseStepType.reps) ...[
|
||||
FilledButton.icon(
|
||||
onPressed: onCompleteStep,
|
||||
style: FilledButton.styleFrom(
|
||||
minimumSize: const Size.fromHeight(48),
|
||||
),
|
||||
icon: const Icon(Icons.check),
|
||||
label: const Text('Étape suivante'),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
],
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
@ -2882,19 +2893,6 @@ final class _CurrentStepPane extends StatelessWidget {
|
||||
),
|
||||
],
|
||||
),
|
||||
if (step.type == ExerciseStepType.reps) ...[
|
||||
const SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: FilledButton.icon(
|
||||
onPressed: onCompleteStep,
|
||||
style: FilledButton.styleFrom(
|
||||
minimumSize: const Size.fromHeight(44),
|
||||
),
|
||||
icon: const Icon(Icons.check),
|
||||
label: const Text('Étape suivante'),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
],
|
||||
@ -2926,23 +2924,38 @@ final class _TimedStepBody extends StatelessWidget {
|
||||
children: [
|
||||
Text('Objectif : ${_formatShortSeconds(step.defaultTargetValue)}'),
|
||||
const SizedBox(height: 4),
|
||||
Center(
|
||||
child: Text(
|
||||
Expanded(
|
||||
child: LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
return FittedBox(
|
||||
fit: BoxFit.contain,
|
||||
alignment: Alignment.center,
|
||||
child: SizedBox(
|
||||
width: constraints.maxWidth,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
Text(
|
||||
remainingLabel,
|
||||
style: Theme.of(context).textTheme.displayMedium?.copyWith(
|
||||
textAlign: TextAlign.center,
|
||||
style: Theme.of(context).textTheme.displayMedium
|
||||
?.copyWith(
|
||||
fontFamily: 'Anton',
|
||||
fontFeatures: AppTextStyles.timer(context).fontFeatures,
|
||||
fontFeatures: AppTextStyles.timer(
|
||||
context,
|
||||
).fontFeatures,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
),
|
||||
),
|
||||
if (!running) ...[
|
||||
const SizedBox(height: 8),
|
||||
if (readyToStart) ...[
|
||||
Text(
|
||||
'Chrono prêt',
|
||||
textAlign: TextAlign.center,
|
||||
style: Theme.of(context).textTheme.titleSmall?.copyWith(
|
||||
style: Theme.of(context).textTheme.titleSmall
|
||||
?.copyWith(
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
),
|
||||
@ -2958,6 +2971,13 @@ final class _TimedStepBody extends StatelessWidget {
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1947,7 +1947,20 @@ void main() {
|
||||
find.widgetWithText(OutlinedButton, 'Passer l’étape'),
|
||||
findsOneWidget,
|
||||
);
|
||||
expect(find.widgetWithText(FilledButton, 'Étape suivante'), findsOneWidget);
|
||||
final nextStepButton = find.widgetWithText(FilledButton, 'Étape suivante');
|
||||
final skipStepButton = find.widgetWithText(
|
||||
OutlinedButton,
|
||||
'Passer l’étape',
|
||||
);
|
||||
expect(nextStepButton, findsOneWidget);
|
||||
expect(
|
||||
tester.getTopLeft(nextStepButton).dy,
|
||||
lessThan(tester.getTopLeft(skipStepButton).dy),
|
||||
);
|
||||
expect(
|
||||
tester.getSize(nextStepButton).width,
|
||||
greaterThan(tester.getSize(skipStepButton).width),
|
||||
);
|
||||
await tester.tap(find.text('Étape suivante'));
|
||||
await tester.pump();
|
||||
|
||||
@ -1997,6 +2010,12 @@ void main() {
|
||||
await tester.pump();
|
||||
|
||||
expect(find.text('00:05'), findsOneWidget);
|
||||
expect(
|
||||
find.byWidgetPredicate(
|
||||
(widget) => widget is FittedBox && widget.fit == BoxFit.contain,
|
||||
),
|
||||
findsWidgets,
|
||||
);
|
||||
await tester.tap(find.widgetWithText(FilledButton, 'Lancer'));
|
||||
await tester.pump();
|
||||
clock.value = DateTime.utc(2026, 7, 17, 12, 0, 2);
|
||||
|
||||
Reference in New Issue
Block a user