Files
GroundedHelper/frontend/lib/Grounded/mock/MockMemory.dart
alvocool 4548e1f164 Rebuild Home around a forest header with streak, score and water
Home now opens on a deep green header: greeting, a Today / Weekly toggle,
a seven-day streak with a leaf on every kept day, minutes held with a +
ring, plan thumbnails, the report-card letter as the score, and one bar per
commitment class (weekly view swaps in per-day bars and class rates). The
+ opens an "Add to today" sheet over the blurred day. A water tracker sits
below the header, kept on the device. The nav marks the selected tab as a
filled block and drops the side action button.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KhQh614DMeYoQEH9SoMRUw
2026-11-02 20:58:41 +03:00

34 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"));
setWaterToday(1250);
setTodos(<TodoItem>[
TodoItem(id: "t1", title: "Refill water bottle"),
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();
}