feat: implement multi-step mood logging wizard
Adds sleep/energy/positivity/self-worth tracking columns to the database (schema v2 migration), a new 5-option StepScale widget, per-answer chips at the top of the screen, a 2×2 activity grid chip, and a full step-by-step wizard flow: mood → sleep (first entry today only) → energy → positivity → self-worth → activities → review+save.
This commit is contained in:
@@ -32,7 +32,7 @@ class AppDatabase extends _$AppDatabase {
|
||||
AppDatabase() : super(_openConnection());
|
||||
|
||||
@override
|
||||
int get schemaVersion => 1;
|
||||
int get schemaVersion => 2;
|
||||
|
||||
@override
|
||||
MigrationStrategy get migration => MigrationStrategy(
|
||||
@@ -41,7 +41,16 @@ class AppDatabase extends _$AppDatabase {
|
||||
await _seedDefaultActivities();
|
||||
},
|
||||
onUpgrade: (m, from, to) async {
|
||||
// Future migrations go here
|
||||
if (from < 2) {
|
||||
await m.addColumn(moodEntries,
|
||||
moodEntries.sleepMinutes as GeneratedColumn<Object>);
|
||||
await m.addColumn(moodEntries,
|
||||
moodEntries.energyLevel as GeneratedColumn<Object>);
|
||||
await m.addColumn(moodEntries,
|
||||
moodEntries.positivityLevel as GeneratedColumn<Object>);
|
||||
await m.addColumn(moodEntries,
|
||||
moodEntries.selfWorthLevel as GeneratedColumn<Object>);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user