From 1e1d44f8dd203f10bc186bbcb10b29951d60e781 Mon Sep 17 00:00:00 2001 From: Jules Date: Wed, 10 Apr 2024 14:57:02 +0200 Subject: [PATCH] :bug:: fix datepicker not working --- .../lib/week_schedule/cubit/week_schedule_cubit.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/app_student/lib/week_schedule/cubit/week_schedule_cubit.dart b/frontend/app_student/lib/week_schedule/cubit/week_schedule_cubit.dart index 6625f0d..1a2aebd 100644 --- a/frontend/app_student/lib/week_schedule/cubit/week_schedule_cubit.dart +++ b/frontend/app_student/lib/week_schedule/cubit/week_schedule_cubit.dart @@ -34,7 +34,7 @@ class WeekScheduleCubit extends Cubit { weekSchedule.expand((week) => week.daySchedules).toList(); // Only find the closest date if initialDate has not been set - initialDate = findClosestDate(allEvents); + initialDate ??= findClosestDate(allEvents); final todayIndex = findTodayIndex(allEvents);