mirror of
https://github.com/wger-project/flutter.git
synced 2026-12-01 02:02:35 +01:00
Fixes #68
This commit is contained in:
@@ -97,7 +97,7 @@ class _DashboardCalendarWidgetState extends State<DashboardCalendarWidget>
|
||||
|
||||
// Process workout sessions
|
||||
WorkoutPlansProvider plans = Provider.of<WorkoutPlansProvider>(context, listen: false);
|
||||
plans.fetchSessionData().then((entries) {
|
||||
await plans.fetchSessionData().then((entries) {
|
||||
for (var entry in entries['results']) {
|
||||
final session = WorkoutSession.fromJson(entry);
|
||||
final date = DateFormatLists.format(session.date);
|
||||
@@ -134,6 +134,9 @@ class _DashboardCalendarWidgetState extends State<DashboardCalendarWidget>
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
// Add initial selected day to events list
|
||||
_selectedEvents.value = _getEventsForDay(_selectedDay!);
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@@ -142,6 +142,9 @@ class _WorkoutLogCalendarState extends State<WorkoutLogCalendar> {
|
||||
)
|
||||
];
|
||||
}
|
||||
|
||||
// Add initial selected day to events list
|
||||
_selectedEvents.value = _getEventsForDay(_selectedDay!);
|
||||
}
|
||||
|
||||
List<WorkoutLogEvent> _getEventsForDay(DateTime day) {
|
||||
|
||||
Reference in New Issue
Block a user