From f3be926f4857673960ebae62ff3e03e66cf56992 Mon Sep 17 00:00:00 2001 From: Jules Artaud Date: Thu, 14 Mar 2024 19:02:34 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A8:=20linter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/widgets/components/datepicker_button.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 + } } }, );