Save local date

This hopefully fixes an error where no logs would be shown in the calendar when
running the app on a real device
This commit is contained in:
Roland Geider
2021-04-25 16:17:16 +02:00
parent fc4e9c45df
commit 37e4cf3551
2 changed files with 3 additions and 1 deletions

View File

@@ -63,9 +63,11 @@ class Setting {
@JsonKey(ignore: true)
late WeightUnit weightUnitObj;
/// Personal notes about this setting. Currently not used
@JsonKey(required: true)
late String comment = '';
/// Reps in Reserve
@JsonKey(required: true)
String? rir = '';

View File

@@ -128,7 +128,7 @@ class _WorkoutLogCalendarState extends State<WorkoutLogCalendar> {
void loadEvents() {
for (var date in widget._workoutPlan.logData.keys) {
var entry = widget._workoutPlan.logData[date]!;
_events[date] = [WorkoutLogEvent(date, entry['session'], entry['exercises'])];
_events[date.toLocal()] = [WorkoutLogEvent(date, entry['session'], entry['exercises'])];
}
}