|
|
|
@ -1,6 +1,7 @@
|
|
|
|
import 'package:easy_localization/easy_localization.dart';
|
|
|
|
import 'package:easy_localization/easy_localization.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_staggered_animations/flutter_staggered_animations.dart';
|
|
|
|
import 'package:flutter_staggered_animations/flutter_staggered_animations.dart';
|
|
|
|
|
|
|
|
import 'package:get_it/get_it.dart';
|
|
|
|
import 'package:hmg_patient_app_new/core/api_consts.dart';
|
|
|
|
import 'package:hmg_patient_app_new/core/api_consts.dart';
|
|
|
|
import 'package:hmg_patient_app_new/core/app_assets.dart';
|
|
|
|
import 'package:hmg_patient_app_new/core/app_assets.dart';
|
|
|
|
import 'package:hmg_patient_app_new/core/app_export.dart';
|
|
|
|
import 'package:hmg_patient_app_new/core/app_export.dart';
|
|
|
|
@ -13,8 +14,10 @@ import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
|
|
|
|
import 'package:hmg_patient_app_new/features/authentication/authentication_view_model.dart';
|
|
|
|
import 'package:hmg_patient_app_new/features/authentication/authentication_view_model.dart';
|
|
|
|
import 'package:hmg_patient_app_new/features/blood_donation/blood_donation_view_model.dart';
|
|
|
|
import 'package:hmg_patient_app_new/features/blood_donation/blood_donation_view_model.dart';
|
|
|
|
import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_view_model.dart';
|
|
|
|
import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_view_model.dart';
|
|
|
|
|
|
|
|
import 'package:hmg_patient_app_new/features/emergency_services/emergency_services_view_model.dart';
|
|
|
|
import 'package:hmg_patient_app_new/features/habib_wallet/habib_wallet_view_model.dart';
|
|
|
|
import 'package:hmg_patient_app_new/features/habib_wallet/habib_wallet_view_model.dart';
|
|
|
|
import 'package:hmg_patient_app_new/features/hmg_services/models/ui_models/hmg_services_component_model.dart';
|
|
|
|
import 'package:hmg_patient_app_new/features/hmg_services/models/ui_models/hmg_services_component_model.dart';
|
|
|
|
|
|
|
|
import 'package:hmg_patient_app_new/features/hospital/hospital_selection_view_model.dart';
|
|
|
|
import 'package:hmg_patient_app_new/features/medical_file/medical_file_view_model.dart';
|
|
|
|
import 'package:hmg_patient_app_new/features/medical_file/medical_file_view_model.dart';
|
|
|
|
import 'package:hmg_patient_app_new/features/water_monitor/water_monitor_view_model.dart';
|
|
|
|
import 'package:hmg_patient_app_new/features/water_monitor/water_monitor_view_model.dart';
|
|
|
|
import 'package:hmg_patient_app_new/features/weather/weather_view_model.dart';
|
|
|
|
import 'package:hmg_patient_app_new/features/weather/weather_view_model.dart';
|
|
|
|
@ -45,6 +48,7 @@ import 'package:provider/provider.dart';
|
|
|
|
import 'package:url_launcher/url_launcher.dart';
|
|
|
|
import 'package:url_launcher/url_launcher.dart';
|
|
|
|
|
|
|
|
|
|
|
|
import '../../core/dependencies.dart';
|
|
|
|
import '../../core/dependencies.dart';
|
|
|
|
|
|
|
|
import '../emergency_services/call_ambulance/widgets/HospitalBottomSheetBody.dart';
|
|
|
|
|
|
|
|
|
|
|
|
class ServicesPage extends StatefulWidget {
|
|
|
|
class ServicesPage extends StatefulWidget {
|
|
|
|
final bool showBackIcon;
|
|
|
|
final bool showBackIcon;
|
|
|
|
@ -116,51 +120,51 @@ class _ServicesPageState extends State<ServicesPage> {
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
// HmgServicesComponentModel(
|
|
|
|
HmgServicesComponentModel(
|
|
|
|
// 11,
|
|
|
|
11,
|
|
|
|
// LocaleKeys.indoorNavigation.tr(),
|
|
|
|
LocaleKeys.indoorNavigation.tr(),
|
|
|
|
// "",
|
|
|
|
"",
|
|
|
|
// AppAssets.indoor_nav_icon,
|
|
|
|
AppAssets.indoor_nav_icon,
|
|
|
|
// bgColor: Color(0xff45A2F8),
|
|
|
|
bgColor: Color(0xff45A2F8),
|
|
|
|
// true,
|
|
|
|
true,
|
|
|
|
// route: null,
|
|
|
|
route: null,
|
|
|
|
// onTap: () {
|
|
|
|
onTap: () {
|
|
|
|
// showCommonBottomSheetWithoutHeight(
|
|
|
|
showCommonBottomSheetWithoutHeight(
|
|
|
|
// title: LocaleKeys.selectHospital.tr(),
|
|
|
|
title: LocaleKeys.selectHospital.tr(),
|
|
|
|
// GetIt.instance<NavigationService>().navigatorKey.currentContext!,
|
|
|
|
GetIt.instance<NavigationService>().navigatorKey.currentContext!,
|
|
|
|
// child: ChangeNotifierProvider(
|
|
|
|
child: ChangeNotifierProvider(
|
|
|
|
// create: (context) => HospitalSelectionBottomSheetViewModel(getIt()),
|
|
|
|
create: (context) => HospitalSelectionBottomSheetViewModel(getIt()),
|
|
|
|
// child: Consumer<HospitalSelectionBottomSheetViewModel>(
|
|
|
|
child: Consumer<HospitalSelectionBottomSheetViewModel>(
|
|
|
|
// builder: (_, vm, __) => HospitalBottomSheetBody(
|
|
|
|
builder: (_, vm, __) => HospitalBottomSheetBody(
|
|
|
|
// searchText: vm.searchController,
|
|
|
|
searchText: vm.searchController,
|
|
|
|
// displayList: vm.displayList,
|
|
|
|
displayList: vm.displayList,
|
|
|
|
// onFacilityClicked: (value) {
|
|
|
|
onFacilityClicked: (value) {
|
|
|
|
// vm.setSelectedFacility(value);
|
|
|
|
vm.setSelectedFacility(value);
|
|
|
|
// vm.getDisplayList();
|
|
|
|
vm.getDisplayList();
|
|
|
|
// },
|
|
|
|
},
|
|
|
|
// onHospitalClicked: (hospital) {
|
|
|
|
onHospitalClicked: (hospital) {
|
|
|
|
// Navigator.pop(GetIt.instance<NavigationService>().navigatorKey.currentContext!);
|
|
|
|
Navigator.pop(GetIt.instance<NavigationService>().navigatorKey.currentContext!);
|
|
|
|
// vm.openPenguin(hospital);
|
|
|
|
vm.openPenguin(hospital);
|
|
|
|
// },
|
|
|
|
},
|
|
|
|
// onHospitalSearch: (value) {
|
|
|
|
onHospitalSearch: (value) {
|
|
|
|
// vm.searchHospitals(value ?? "");
|
|
|
|
vm.searchHospitals(value ?? "");
|
|
|
|
// },
|
|
|
|
},
|
|
|
|
// selectedFacility: vm.selectedFacility,
|
|
|
|
selectedFacility: vm.selectedFacility,
|
|
|
|
// hmcCount: vm.hmcCount,
|
|
|
|
hmcCount: vm.hmcCount,
|
|
|
|
// hmgCount: vm.hmgCount,
|
|
|
|
hmgCount: vm.hmgCount,
|
|
|
|
// ),
|
|
|
|
),
|
|
|
|
// ),
|
|
|
|
),
|
|
|
|
// ),
|
|
|
|
),
|
|
|
|
// isFullScreen: false,
|
|
|
|
isFullScreen: false,
|
|
|
|
// isCloseButtonVisible: true,
|
|
|
|
isCloseButtonVisible: true,
|
|
|
|
// hasBottomPadding: false,
|
|
|
|
hasBottomPadding: false,
|
|
|
|
// backgroundColor: AppColors.bottomSheetBgColor,
|
|
|
|
backgroundColor: AppColors.bottomSheetBgColor,
|
|
|
|
// callBackFunc: () {
|
|
|
|
callBackFunc: () {
|
|
|
|
// GetIt.instance<NavigationService>().navigatorKey.currentContext!.read<EmergencyServicesViewModel>().clearSearchText();
|
|
|
|
GetIt.instance<NavigationService>().navigatorKey.currentContext!.read<EmergencyServicesViewModel>().clearSearchText();
|
|
|
|
// },
|
|
|
|
},
|
|
|
|
// );
|
|
|
|
);
|
|
|
|
// },
|
|
|
|
},
|
|
|
|
// ),
|
|
|
|
),
|
|
|
|
HmgServicesComponentModel(
|
|
|
|
HmgServicesComponentModel(
|
|
|
|
11, LocaleKeys.eReferralServices.tr(), "", AppAssets.eReferral, bgColor: AppColors.eReferralCardColor, true, route: null, onTap: () async {
|
|
|
|
11, LocaleKeys.eReferralServices.tr(), "", AppAssets.eReferral, bgColor: AppColors.eReferralCardColor, true, route: null, onTap: () async {
|
|
|
|
if (getIt.get<AppState>().isAuthenticated) {
|
|
|
|
if (getIt.get<AppState>().isAuthenticated) {
|
|
|
|
|