feat: wire up app shell, log mood screen, and fix Android build

- Bootstrap ProviderScope in main.dart and move App to app.dart with light/dark theming
- Add initial LogMoodScreen with mood entry flow and shared activity/mood widgets
- Add kIsWeb guard in app_database.dart for drift web support
- Enable Android core library desugaring required by flutter_local_notifications 21.x
- Guard all async notifier state assignments with ref.mounted checks to prevent
  use-after-dispose errors when providers are auto-disposed mid-operation
This commit is contained in:
2026-04-26 12:00:14 +10:00
parent 33d1713f51
commit 59597c7a4f
12 changed files with 337 additions and 22 deletions
+10
View File
@@ -1,3 +1,4 @@
import 'package:flutter/foundation.dart';
import 'package:drift/drift.dart';
import 'package:drift_flutter/drift_flutter.dart';
import 'package:path_provider/path_provider.dart';
@@ -84,6 +85,15 @@ class AppDatabase extends _$AppDatabase {
}
QueryExecutor _openConnection() {
if (kIsWeb) {
return driftDatabase(
name: 'lumina_db',
web: DriftWebOptions(
sqlite3Wasm: Uri.parse('sqlite3.wasm'),
driftWorker: Uri.parse('drift_worker.dart.js'),
),
);
}
return driftDatabase(
name: 'lumina_db',
native: DriftNativeOptions(