Stage 1: project setup, Exercise Library, both Mode designs and the Mode switch
- Flutter Android app on CookIT's stack (provider, shared_preferences, gen-l10n) - tools/exercise-import turns free-exercise-db into 876 bundled Exercises with 1,746 WebP images (20 MB); stretching -> Stretching, rest -> Workout - ZenStyle tokens per Mode: calm rounded sage/teal with breath ripples vs. dark ember-to-red with floor-tape slashes; the theme morphs at each Mode's own pace - Remembered global Mode switch, Plans / Library / History tabs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5dfa995d55
commit
1289fadb98
1822 files changed
+2819
No files matched your search
@@ -0,0 +1,25 @@
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:zenxercise/src/modes/mode.dart';
|
||||
import 'package:zenxercise/src/settings/settings_controller.dart';
|
||||
|
||||
void main() {
|
||||
test('starts in Stretching on first launch', () async {
|
||||
SharedPreferences.setMockInitialValues({});
|
||||
final settings = SettingsController(SettingsService());
|
||||
|
||||
await settings.loadSettings();
|
||||
|
||||
expect(settings.mode, Mode.stretching);
|
||||
});
|
||||
|
||||
test('remembers the last-used Mode across launches', () async {
|
||||
SharedPreferences.setMockInitialValues({});
|
||||
await SettingsController(SettingsService()).updateMode(Mode.workout);
|
||||
|
||||
final relaunched = SettingsController(SettingsService());
|
||||
await relaunched.loadSettings();
|
||||
|
||||
expect(relaunched.mode, Mode.workout);
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user