Companion to wger-project/wger#2462 and wger-project/react#XXXX.
- WorkoutLogTable: add nullable `notes` text column (Drift + PowerSync)
- Log model: add `notes` field with constructor, copyWith, and toCompanion
- GymLogNotifier: add setNotes() method
- LogFormWidget: add notes TextFormField with onChanged handler
- LogsPastLogsWidget: show notes inline in past-log subtitle when present
- LogEditDialog: add notes TextFormField, persist on save
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Measurement categories can optionally point to another category, In practice, this
will just be something like blood pressure since these values only make sense in a
pair. Others can be interesting while combined (heart rate and steps), but are valid
on their own.
Server allows workout logs without a routine (free/ad-hoc logging),
but the app's Drift table declared routineId as non-nullable.
This caused a null check operator crash when PowerSync delivered
a row with routine_id = NULL.
Changes:
- WorkoutLogTable.routineId: integer() → integer().nullable()
- Log.routineId: late int → int?
- Log constructor: required this.routineId → this.routineId
- Log.toCompanion: handle null routineId with Value.absent()
Fixes#1250
- Implement centered moving average trendline in charts.dart.
- Update MeasurementChartWidgetFl to render trendline bar data.
- Integrate smoothedTreadline logic into metric chart builder.
refactor(db): implement MetricType Drift converter
- Add MeasurementMetricTypeConverter to map enum to SQLite text.
- Update MeasurementCategoryTable to use the new converter.
- Add metricType property to MeasurementCategory model and DB table.
- Include local-only persistence for metric categorization.
- Update UI form and localization strings.
Refactors WorkoutSession storage from TimeOfDay to DateTime to enable accurate cross-midnight session tracking.
- Adds DateTimeTextConverter to handle ISO8601 serialization/deserialization.
- Updates WorkoutSessionTable to use the new DateTime converter.
- Refactors WorkoutLogRepository to use UTC ISO8601 strings for time range queries in Drift.
- Improves lazy session creation logic to handle closed vs. open session states.