Groups let people keep each other honest: create one or join with a six-letter invite code. Each group has shared goals split into measurable objectives (km, sessions, words) that every member logs toward, a leaderboard of kept rate and streak with nudges, and a group chat where check-ins and nudges appear as cards beside the talk. The open chat polls for new messages. Reached from a new Groups tab (Training moves into the day rail), a Home "Your groups" rail that opens the chat, and a Group tile in the add sheet. Mock mode seeds two groups, a joinable one and members who reply. The water tracker is removed; it did not fit the app. Bottom sheets are now square app-wide via the theme. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KhQh614DMeYoQEH9SoMRUw
33 lines
1.1 KiB
Dart
33 lines
1.1 KiB
Dart
// MOCK DATA — TEMPORARY. See MockSwitch.dart.
|
|
|
|
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
|
|
|
import '../about/internal/application/MeDescription.dart';
|
|
import '../about/internal/application/TodoItem.dart';
|
|
import '../about/internal/application/UserDetails.dart';
|
|
import '../memory/InternalMemory.dart';
|
|
import 'MockStorage.dart';
|
|
|
|
/// The real [InternalMemory], pointed at in-memory storage and pre-seeded
|
|
/// with a signed-in user so the app opens straight onto Home.
|
|
class MockMemory extends InternalMemory {
|
|
static bool _seeded = false;
|
|
|
|
MockMemory() {
|
|
if (!_seeded) {
|
|
_seeded = true;
|
|
setMyDescription(
|
|
MeDescription(id: "mock-user", name: "Alex", token: "mock-token"));
|
|
setUserDetails(UserDetails(pic: "", name: "Alex"));
|
|
setTodos(<TodoItem>[
|
|
TodoItem(id: "t1", title: "Pick up gym kit"),
|
|
TodoItem(id: "t2", title: "Book physio for Thursday"),
|
|
TodoItem(id: "t3", title: "Reply to Sam about Saturday", done: true),
|
|
]);
|
|
}
|
|
}
|
|
|
|
@override
|
|
FlutterSecureStorage get groundedStorage => const MockStorage();
|
|
}
|