From 19e102b52d6e58591cb55e287fdefb634321a52b Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Sun, 26 Apr 2026 12:12:22 +0300 Subject: [PATCH] family member add navigation issue fixed --- lib/features/authentication/authentication_view_model.dart | 3 ++- lib/routes/app_routes.dart | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/features/authentication/authentication_view_model.dart b/lib/features/authentication/authentication_view_model.dart index 8e2d2b47..d02607c5 100644 --- a/lib/features/authentication/authentication_view_model.dart +++ b/lib/features/authentication/authentication_view_model.dart @@ -34,6 +34,7 @@ import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; import 'package:hmg_patient_app_new/presentation/authentication/login.dart'; import 'package:hmg_patient_app_new/presentation/authentication/saved_login_screen.dart'; import 'package:hmg_patient_app_new/presentation/home/navigation_screen.dart'; +import 'package:hmg_patient_app_new/presentation/my_family/my_family.dart'; import 'package:hmg_patient_app_new/routes/app_routes.dart'; import 'package:hmg_patient_app_new/services/cache_service.dart'; import 'package:hmg_patient_app_new/services/dialog_service.dart'; @@ -624,7 +625,7 @@ class AuthenticationViewModel extends ChangeNotifier { if (isFormFamilyFile) { await medicalVm.getAllPendingRecordsByResponseId(); _navigationService.replaceAllRoutesAndNavigateToLandingWithMedicalAuth().whenComplete(() { - _navigationService.pushPageRoute(AppRoutes.medicalFilePage); + _navigationService.pushPageRoute(AppRoutes.familyFilesPage); }); } else { _navigationService.replaceAllRoutesAndNavigateToLanding(); diff --git a/lib/routes/app_routes.dart b/lib/routes/app_routes.dart index 41cb6331..959c364a 100644 --- a/lib/routes/app_routes.dart +++ b/lib/routes/app_routes.dart @@ -18,6 +18,7 @@ import 'package:hmg_patient_app_new/presentation/home/app_update_page.dart'; import 'package:hmg_patient_app_new/presentation/home/navigation_screen.dart'; import 'package:hmg_patient_app_new/presentation/home_health_care/hhc_procedures_page.dart'; import 'package:hmg_patient_app_new/presentation/medical_file/medical_file_page.dart'; +import 'package:hmg_patient_app_new/presentation/my_family/my_family.dart'; import 'package:hmg_patient_app_new/presentation/servicesPriceList/services_price_list_page.dart'; import 'package:hmg_patient_app_new/presentation/smartwatches/huawei_health_example.dart'; import 'package:hmg_patient_app_new/presentation/smartwatches/smartwatch_home_page.dart'; @@ -99,6 +100,9 @@ class AppRoutes { // Weather static const String weatherDetailsPage = '/weatherDetailsPage'; + // Weather + static const String familyFilesPage = '/familyFilesPage'; + static Map get routes => { initialRoute: (context) => SplashPage(), loginScreen: (context) => LoginScreen(), @@ -136,6 +140,7 @@ class AppRoutes { emergencyServicesPage: (context) => EmergencyServicesPage(), servicesPriceListPage: (context) => ServicesPriceListPage(), weatherDetailsPage: (context) => WeatherDetailsPage(), + familyFilesPage: (context) => FamilyMedicalScreen(), addHealthTrackerEntryPage: (context) { final args = ModalRoute.of(context)?.settings.arguments as HealthTrackerTypeEnum?; return AddHealthTrackerEntryPage(