Stage 4: guided Player for both Modes and the Session summary

- buildSegments lays a Plan out as holds with Transitions (get ready,
  switch sides, next round, next exercise) or sets with count-up Rests;
  Supersets alternate members and rest per round unless asked otherwise
- SessionRunner drives segments against an injected clock: auto-advance
  with a chime, pause, skip, back, rep sets confirmed with logged reps
  and kg, timed sets started on demand, early end
- Player screen: countdown ring, accent pulse in the last 3 s, Flip
  Animation, next-up cards, Rest Screen, mute toggle, screen kept on
- Sessions table (schema v2 migration) keeps a Plan snapshot and Set
  Logs; nothing is saved when no hold or set was done
- Summary with time, exercises or sets logged, and every Set Log
- Synthesised quiet cue sounds (tools/sounds), status bar per Mode

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
CedricandClaude Opus 5.5 committed 2026-10-29 00:20:16 +01:00
1 parent bbdca95541
commit 971ff64117
28 files changed
+3465 -84

No files matched your search

+10
View File
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:provider/provider.dart';
@@ -9,6 +10,8 @@ import 'home/home_view.dart';
import 'localization/app_localizations.dart';
import 'plans/views/exercise_picker_view.dart';
import 'plans/views/plan_editor_view.dart';
import 'player/views/player_view.dart';
import 'player/views/summary_view.dart';
import 'settings/settings_controller.dart';
class ZenXerciseApp extends StatelessWidget {
@@ -32,12 +35,19 @@ class ZenXerciseApp extends StatelessWidget {
],
supportedLocales: AppLocalizations.supportedLocales,
onGenerateTitle: (context) => AppLocalizations.of(context).appTitle,
// Status bar icons follow the Mode's ground on every screen, with or without an app bar.
builder: (context, child) => AnnotatedRegion<SystemUiOverlayStyle>(
value: style.brightness == Brightness.dark ? SystemUiOverlayStyle.light : SystemUiOverlayStyle.dark,
child: child!,
),
onGenerateRoute: (settings) => MaterialPageRoute<Object?>(
settings: settings,
builder: (context) => switch (settings.name) {
ExerciseDetailView.routeName => ExerciseDetailView(exerciseId: settings.arguments! as String),
PlanEditorView.routeName => PlanEditorView(planId: settings.arguments! as String),
ExercisePickerView.routeName => ExercisePickerView(planId: settings.arguments! as String),
PlayerView.routeName => PlayerView(planId: settings.arguments! as String),
SummaryView.routeName => SummaryView(sessionId: settings.arguments! as String),
_ => const HomeView(),
},
),