From 287e2b956289e5d86e46c6d879f6a6e75b92a318 Mon Sep 17 00:00:00 2001 From: "Fatimah.Alshammari" Date: Wed, 14 Jan 2026 10:42:50 +0300 Subject: [PATCH] fixed QR --- lib/core/api/api_client.dart | 2 +- lib/core/dependencies.dart | 10 +++++----- lib/routes/app_routes.dart | 23 ++++++++++++----------- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/lib/core/api/api_client.dart b/lib/core/api/api_client.dart index 039787b..722a45e 100644 --- a/lib/core/api/api_client.dart +++ b/lib/core/api/api_client.dart @@ -19,7 +19,7 @@ abstract class ApiClient { Future post( String endPoint, { - required dynamic body, + required Map body, required Function(dynamic response, int statusCode, {int? messageStatus, String? errorMessage}) onSuccess, required Function(String error, int statusCode, {int? messageStatus, Failure? failureType}) onFailure, bool isAllowAny, diff --git a/lib/core/dependencies.dart b/lib/core/dependencies.dart index d70191b..5f2444f 100644 --- a/lib/core/dependencies.dart +++ b/lib/core/dependencies.dart @@ -292,11 +292,11 @@ class AppDependencies { // getIt.registerLazySingleton(() => MyInvoicesViewModel(myInvoicesRepo: getIt(), errorHandlerService: getIt(), navServices: getIt())); getIt.registerLazySingleton(() => MonthlyReportViewModel(errorHandlerService: getIt(), monthlyReportRepo: getIt())); - // getIt.registerLazySingleton(() => MyInvoicesViewModel( - // myInvoicesRepo: getIt(), - // errorHandlerService: getIt(), - // navServices: getIt(), - // )); + getIt.registerLazySingleton(() => MyInvoicesViewModel( + myInvoicesRepo: getIt(), + errorHandlerService: getIt(), + navServices: getIt(), + )); getIt.registerLazySingleton(() => HealthTrackersViewModel(healthTrackersRepo: getIt(), errorHandlerService: getIt())); getIt.registerLazySingleton( () => ActivePrescriptionsViewModel( diff --git a/lib/routes/app_routes.dart b/lib/routes/app_routes.dart index 059969c..632463f 100644 --- a/lib/routes/app_routes.dart +++ b/lib/routes/app_routes.dart @@ -126,17 +126,18 @@ class AppRoutes { return HealthTrackerDetailPage( trackerType: args ?? HealthTrackerTypeEnum.bloodSugar, ); - - monthlyReports: (context) => ChangeNotifierProvider( - create: (_) => MonthlyReportsViewModel( - monthlyReportsRepo: getIt(), - errorHandlerService: getIt(), - ), - child: const MonthlyReportsPage(), - ), - qrParking: (context) => ChangeNotifierProvider( - create: (_) => getIt(), - child: const ParkingPage(), }, + + monthlyReports: (context) => ChangeNotifierProvider( + create: (_) => MonthlyReportsViewModel( + monthlyReportsRepo: getIt(), + errorHandlerService: getIt(), + ), + child: const MonthlyReportsPage(), + ), + qrParking: (context) => ChangeNotifierProvider( + create: (_) => getIt(), + child: const ParkingPage(), + ), }; }