diff --git a/lib/presentation/book_appointment/search_doctor_by_name.dart b/lib/presentation/book_appointment/search_doctor_by_name.dart index 233aff9..5949ef5 100644 --- a/lib/presentation/book_appointment/search_doctor_by_name.dart +++ b/lib/presentation/book_appointment/search_doctor_by_name.dart @@ -88,7 +88,7 @@ class _SearchDoctorByNameState extends State { ), ), Visibility( - visible: bookAppointmentsViewModel.doctorsList.isNotEmpty, + visible: context.watch().doctorsList.isNotEmpty, child: SizedBox( height: 56.h, width: 56.h, @@ -264,4 +264,9 @@ class _SearchDoctorByNameState extends State { ), ); } + @override + void dispose() { + bookAppointmentsViewModel.doctorsList.clear(); + super.dispose(); + } }