diff --git a/frontend/app_student/lib/week_schedule/views/widgets/components/datepicker_button.dart b/frontend/app_student/lib/week_schedule/views/widgets/components/datepicker_button.dart index 3b99a32..c7c8b62 100644 --- a/frontend/app_student/lib/week_schedule/views/widgets/components/datepicker_button.dart +++ b/frontend/app_student/lib/week_schedule/views/widgets/components/datepicker_button.dart @@ -52,8 +52,9 @@ class DatePickerButton extends StatelessWidget { final today = DateTime.now(); final date = await selectDate(context, cubit, today); if (date != null) { - // ignore: use_build_context_synchronously - await navigateToDate(context, cubit, date); // Await the navigation + if (context.mounted) { + await navigateToDate(context, cubit, date); // Await the navigation + } } }, );