pickup direction bottom sheet added and previous radio bottom sheet removed

ambulance_selection_change
tahaalam 1 day ago
parent 9612b0019c
commit 8a11cc03cb

@ -1618,5 +1618,9 @@
"sortByLocation": "الترتيب حسب الموقع",
"timeForFirstReminder": "وقت التذكير الأول",
"reminderRemovalNote": "يمكنك إزالتها من التقويم الخاص بك لاحقاً عن طريق إيقاف تشغيل التذكير",
"communicationLanguage": "لغة التواصل"
"communicationLanguage": "لغة التواصل",
"oneWaySubtitle": "نقل من الموقع إلى المستشفى",
"twoWaySubtitle": "نقل من الموقع إلى المستشفى والعودة مرة أخرى",
"toHospitalSubtitle": "نقل من موقعك الحالي إلى المستشفى",
"fromHospitalSubtitle": "نقل من المستشفى إلى منزلك"
}

@ -1611,5 +1611,9 @@
"sortByLocation": "Sort by location",
"sortByNearestLocation": "Sort by nearest to your location",
"giveLocationPermissionForNearestList": "Please grant location permission from app settings to see the nearest locations.",
"communicationLanguage": "Communication Language"
"communicationLanguage": "Communication Language",
"oneWaySubtitle": "Pickup from location to hospital",
"twoWaySubtitle": "Round trip from location to hospital and back",
"toHospitalSubtitle": "Transfer from your current location to the hospital",
"fromHospitalSubtitle": "Transfer from the hospital back to your home"
}

@ -149,7 +149,7 @@ class EmergencyServicesRepoImp implements EmergencyServicesRepo {
GenericApiModel<List<PatientERTransportationMethod>>? apiResponse;
Failure? failure;
await apiClient.get(
"$GET_ALL_TRANSPORTATIONS_RC?patientID=$id",
"$GET_ALL_TRANSPORTATIONS_RC?patientID=1231755",
isRCService: true,
onFailure: (error, statusCode, {messageStatus, failureType}) {
failure = failureType;

@ -530,6 +530,7 @@ class EmergencyServicesViewModel extends ChangeNotifier {
void setTransportationOption(PatientERTransportationMethod item) {
selectedTransportOption = item;
notifyListeners();
}
void updateCallingPlace(AmbulanceCallingPlace? value) {

@ -1597,6 +1597,7 @@ abstract class LocaleKeys {
static const timeFor = 'timeFor';
static const hmgPolicies = 'hmgPolicies';
static const darkMode = 'darkMode';
static const featureComingSoonDescription = 'featureComingSoonDescription';
static const generateAiAnalysisResult = 'generateAiAnalysisResult';
static const ratings = 'ratings';
static const hmgPharmacyText = 'hmgPharmacyText';
@ -1611,6 +1612,9 @@ abstract class LocaleKeys {
static const timeForFirstReminder = 'timeForFirstReminder';
static const reminderRemovalNote = 'reminderRemovalNote';
static const communicationLanguage = 'communicationLanguage';
static const featureComingSoonDescription = 'featureComingSoonDescription';
static const oneWaySubtitle = 'oneWaySubtitle';
static const twoWaySubtitle = 'twoWaySubtitle';
static const toHospitalSubtitle = 'toHospitalSubtitle';
static const fromHospitalSubtitle = 'fromHospitalSubtitle';
}

@ -0,0 +1,170 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.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/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/emergency_services/emergency_services_view_model.dart';
import 'package:hmg_patient_app_new/features/emergency_services/models/AmbulanceCallingPlace.dart';
import 'package:hmg_patient_app_new/features/emergency_services/models/ambulance_direction.dart';
import 'package:hmg_patient_app_new/presentation/emergency_services/call_ambulance/widgets/transport_option_Item.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
import 'package:provider/provider.dart';
import '../../../../generated/locale_keys.g.dart' show LocaleKeys;
class WayPickup extends StatelessWidget {
final VoidCallback onTap;
const WayPickup({super.key, required this.onTap});
@override
Widget build(BuildContext context) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.selectWay.tr(context: context)
.toText24(color: AppColors.textColor, isBold: true),
SizedBox(
height: 16.h,
),
// LocaleKeys.selectDirection.tr(context: context)
// .toText16(color: AppColors.textColor, weight: FontWeight.w600),
// SizedBox(
// height: 12.h,
// ),
Column(
children: [
SizedBox(height: 12.h),
Column(
mainAxisAlignment: MainAxisAlignment.start,
spacing:8.h,
children: [
TransportOptionItem(
title: LocaleKeys.oneWay.tr(context: context),
subTitle: LocaleKeys.oneWaySubtitle.tr(context: context),
firstIcon: AppAssets.to_arrow,
middleIcon: AppAssets.to_arrow,
lastIcon: AppAssets.hospital,
shouldFlipIcon: true,
price: context.read<EmergencyServicesViewModel>().selectedTransportOption?.priceTotal?.toString()??"",
onTap: () {
context
.read<EmergencyServicesViewModel>()
.updateDirection( AmbulanceDirection.ONE_WAY);
onTap();
},
),
TransportOptionItem(
title: LocaleKeys.twoWay.tr(context: context),
subTitle: LocaleKeys.twoWaySubtitle.tr(context: context),
firstIcon: AppAssets.dual_arrow,
middleIcon: AppAssets.dual_arrow,
lastIcon: AppAssets.hospital,
price: ((context.read<EmergencyServicesViewModel>().selectedTransportOption?.priceTotal??0)*2).toString(),
onTap: () {
context
.read<EmergencyServicesViewModel>()
.updateDirection( AmbulanceDirection.TWO_WAY);
onTap();
},
),
// Visibility(
// visible: value == AmbulanceCallingPlace.TO_HOSPITAL,
// child: Selector<EmergencyServicesViewModel, AmbulanceDirection>(
// selector: (context, viewModel) => viewModel.ambulanceDirection,
// builder: (context, directionValue, _) {
// return Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// SizedBox(height: 16.h),
// LocaleKeys.selectWay.tr(context: context)
// .toText16(color: AppColors.textColor, weight: FontWeight.w600),
// SizedBox(height: 12.h),
// Row(
// mainAxisAlignment: MainAxisAlignment.start,
// children: [
// Expanded(
// child: Row(
// children: [
// Radio<AmbulanceDirection>(
// value: AmbulanceDirection.ONE_WAY,
// groupValue: directionValue,
// onChanged: (AmbulanceDirection? newValue) {
// if (newValue != null) {
// context
// .read<EmergencyServicesViewModel>()
// .updateDirection(newValue);
// }
// },
// activeColor: AppColors.primaryRedColor,
// fillColor: MaterialStateProperty.all(AppColors.primaryRedColor),
// ),
// LocaleKeys.oneWay.tr(context: context)
// .toText12(color: AppColors.textColor, fontWeight: FontWeight.w500)
// ],
// ).onPress(() {
// context
// .read<EmergencyServicesViewModel>()
// .updateDirection(AmbulanceDirection.ONE_WAY);
// }),
// ),
// Expanded(
// child: Row(
// children: [
// Radio<AmbulanceDirection>(
// value: AmbulanceDirection.TWO_WAY,
// groupValue: directionValue,
// onChanged: (AmbulanceDirection? newValue) {
// if (newValue != null) {
// context
// .read<EmergencyServicesViewModel>()
// .updateDirection(newValue);
// }
// },
// activeColor: AppColors.primaryRedColor,
// fillColor: MaterialStateProperty.all(AppColors.primaryRedColor),
// ),
// LocaleKeys.twoWay.tr(context: context)
// .toText14(color: AppColors.textColor, weight: FontWeight.w500)
// ],
// ).onPress(() {
// context
//
// .read<EmergencyServicesViewModel>()
// .updateDirection(AmbulanceDirection.TWO_WAY);
// }),
// ),
// ],
// ),
// ],
// );
// },
// ),
],
),
],
),
// Selector<EmergencyServicesViewModel, AmbulanceCallingPlace>(
// selector: (context, viewModel) => viewModel.callingPlace,
// builder: (context, value, _) {
// return ;
// },
// ),
SizedBox(
height: 16.h,
),
// CustomButton(
// text: LocaleKeys.confirm.tr(context: context),
// onPressed: onTap,
// backgroundColor: AppColors.primaryRedColor,
// borderColor: AppColors.primaryRedColor,
// textColor: AppColors.whiteColor,
// iconColor: AppColors.whiteColor,
// ),
],
);
}
}

@ -29,7 +29,7 @@ class AmbulanceOptionSelectionBottomSheet extends StatelessWidget {
itemBuilder: (_, index) => TransportOptionItem(
title: Utils.getTextWRTCurrentLanguage(data[index].text, data[index].textN),
subTitle: "",
firstIcon: AppAssets.location_pickup,
firstIcon: AppAssets.ambulance,
middleIcon: AppAssets.to_arrow,
lastIcon: AppAssets.hospital,
price: data[index].priceTotal.toString(),

@ -1,11 +1,13 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.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/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/emergency_services/emergency_services_view_model.dart';
import 'package:hmg_patient_app_new/features/emergency_services/models/AmbulanceCallingPlace.dart';
import 'package:hmg_patient_app_new/features/emergency_services/models/ambulance_direction.dart';
import 'package:hmg_patient_app_new/presentation/emergency_services/call_ambulance/widgets/transport_option_Item.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
import 'package:provider/provider.dart';
@ -13,7 +15,7 @@ import 'package:provider/provider.dart';
import '../../../../generated/locale_keys.g.dart' show LocaleKeys;
class PickupLocation extends StatelessWidget {
final VoidCallback onTap;
final Function(AmbulanceCallingPlace) onTap;
const PickupLocation({super.key, required this.onTap});
@override
@ -26,159 +28,189 @@ class PickupLocation extends StatelessWidget {
SizedBox(
height: 16.h,
),
LocaleKeys.selectDirection.tr(context: context)
.toText16(color: AppColors.textColor, weight: FontWeight.w600),
SizedBox(
height: 12.h,
),
Selector<EmergencyServicesViewModel, AmbulanceCallingPlace>(
selector: (context, viewModel) => viewModel.callingPlace,
builder: (context, value, _) {
return Column(
// LocaleKeys.selectDirection.tr(context: context)
// .toText16(color: AppColors.textColor, weight: FontWeight.w600),
// SizedBox(
// height: 12.h,
// ),
Column(
children: [
SizedBox(height: 12.h),
Column(
mainAxisAlignment: MainAxisAlignment.start,
spacing:8.h,
children: [
SizedBox(height: 12.h),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(
child: Row(
children: [
Radio<AmbulanceCallingPlace>(
value: AmbulanceCallingPlace.TO_HOSPITAL,
groupValue: value,
onChanged: (AmbulanceCallingPlace? newValue) {
if (newValue != null) {
context
.read<EmergencyServicesViewModel>()
.updateCallingPlace(newValue);
}
},
activeColor: AppColors.primaryRedColor,
fillColor: MaterialStateProperty.all(AppColors.primaryRedColor),
),
LocaleKeys.toHospital.tr(context: context)
.toText14(color: AppColors.textColor, weight: FontWeight.w500)
],
).onPress(() {
context
.read<EmergencyServicesViewModel>()
.updateCallingPlace(AmbulanceCallingPlace.TO_HOSPITAL);
}),
),
Expanded(
child: Row(
children: [
Radio<AmbulanceCallingPlace>(
value: AmbulanceCallingPlace.FROM_HOSPITAL,
groupValue: value,
onChanged: (AmbulanceCallingPlace? newValue) {
if (newValue != null) {
context
.read<EmergencyServicesViewModel>()
.updateCallingPlace(newValue);
}
},
activeColor: AppColors.primaryRedColor,
fillColor: MaterialStateProperty.all(AppColors.primaryRedColor),
),
LocaleKeys.fromHospital.tr(context: context)
.toText14(color: AppColors.textColor, weight: FontWeight.w500)
],
).onPress(() {
context
.read<EmergencyServicesViewModel>()
.updateCallingPlace(AmbulanceCallingPlace.FROM_HOSPITAL);
}),
),
],
TransportOptionItem(
title: LocaleKeys.toHospital.tr(context: context),
subTitle: LocaleKeys.toHospitalSubtitle.tr(context: context),
firstIcon: AppAssets.homeBottomFill,
middleIcon: AppAssets.to_arrow,
lastIcon: AppAssets.hospital,
price: context.read<EmergencyServicesViewModel>().selectedTransportOption?.priceTotal?.toString()??"",
onTap: () {
context.read<EmergencyServicesViewModel>()
.updateCallingPlace(AmbulanceCallingPlace.TO_HOSPITAL);
onTap(AmbulanceCallingPlace.TO_HOSPITAL);
},
),
Visibility(
visible: value == AmbulanceCallingPlace.TO_HOSPITAL,
child: Selector<EmergencyServicesViewModel, AmbulanceDirection>(
selector: (context, viewModel) => viewModel.ambulanceDirection,
builder: (context, directionValue, _) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 16.h),
LocaleKeys.selectWay.tr(context: context)
.toText16(color: AppColors.textColor, weight: FontWeight.w600),
SizedBox(height: 12.h),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(
child: Row(
children: [
Radio<AmbulanceDirection>(
value: AmbulanceDirection.ONE_WAY,
groupValue: directionValue,
onChanged: (AmbulanceDirection? newValue) {
if (newValue != null) {
context
.read<EmergencyServicesViewModel>()
.updateDirection(newValue);
}
},
activeColor: AppColors.primaryRedColor,
fillColor: MaterialStateProperty.all(AppColors.primaryRedColor),
),
LocaleKeys.oneWay.tr(context: context)
.toText12(color: AppColors.textColor, fontWeight: FontWeight.w500)
],
).onPress(() {
context
.read<EmergencyServicesViewModel>()
.updateDirection(AmbulanceDirection.ONE_WAY);
}),
),
Expanded(
child: Row(
children: [
Radio<AmbulanceDirection>(
value: AmbulanceDirection.TWO_WAY,
groupValue: directionValue,
onChanged: (AmbulanceDirection? newValue) {
if (newValue != null) {
context
.read<EmergencyServicesViewModel>()
.updateDirection(newValue);
}
},
activeColor: AppColors.primaryRedColor,
fillColor: MaterialStateProperty.all(AppColors.primaryRedColor),
),
LocaleKeys.twoWay.tr(context: context)
.toText14(color: AppColors.textColor, weight: FontWeight.w500)
],
).onPress(() {
context
.read<EmergencyServicesViewModel>()
.updateDirection(AmbulanceDirection.TWO_WAY);
}),
),
],
),
],
);
},
),
)
TransportOptionItem(
title: LocaleKeys.fromHospital.tr(context: context),
subTitle: LocaleKeys.fromHospitalSubtitle.tr(context: context),
firstIcon: AppAssets.hospital,
middleIcon: AppAssets.to_arrow,
lastIcon: AppAssets.hospital,
price: context.read<EmergencyServicesViewModel>().selectedTransportOption?.priceTotal?.toString()??"",
onTap: () {
context.read<EmergencyServicesViewModel>().updateCallingPlace(AmbulanceCallingPlace.FROM_HOSPITAL);
onTap(AmbulanceCallingPlace.FROM_HOSPITAL);
},
),
// Expanded(
// child: Row(
// children: [
// Radio<AmbulanceCallingPlace>(
// value: AmbulanceCallingPlace.TO_HOSPITAL,
// groupValue: value,
// onChanged: (AmbulanceCallingPlace? newValue) {
// if (newValue != null) {
// context
// .read<EmergencyServicesViewModel>()
// .updateCallingPlace(newValue);
// }
// },
// activeColor: AppColors.primaryRedColor,
// fillColor: MaterialStateProperty.all(AppColors.primaryRedColor),
// ),
// LocaleKeys.toHospital.tr(context: context)
// .toText14(color: AppColors.textColor, weight: FontWeight.w500)
// ],
// ).onPress(() {
// context
// .read<EmergencyServicesViewModel>()
// .updateCallingPlace(AmbulanceCallingPlace.TO_HOSPITAL);
// }),
// ),
// Expanded(
// child: Row(
// children: [
// Radio<AmbulanceCallingPlace>(
// value: AmbulanceCallingPlace.FROM_HOSPITAL,
// groupValue: value,
// onChanged: (AmbulanceCallingPlace? newValue) {
// if (newValue != null) {
// context
// .read<EmergencyServicesViewModel>()
// .updateCallingPlace(newValue);
// }
// },
// activeColor: AppColors.primaryRedColor,
// fillColor: MaterialStateProperty.all(AppColors.primaryRedColor),
// ),
// LocaleKeys.fromHospital.tr(context: context)
// .toText14(color: AppColors.textColor, weight: FontWeight.w500)
// ],
// ).onPress(() {
// context
// .read<EmergencyServicesViewModel>()
// .updateCallingPlace(AmbulanceCallingPlace.FROM_HOSPITAL);
// }),
// ),
// ],
// ),
// Visibility(
// visible: value == AmbulanceCallingPlace.TO_HOSPITAL,
// child: Selector<EmergencyServicesViewModel, AmbulanceDirection>(
// selector: (context, viewModel) => viewModel.ambulanceDirection,
// builder: (context, directionValue, _) {
// return Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// SizedBox(height: 16.h),
// LocaleKeys.selectWay.tr(context: context)
// .toText16(color: AppColors.textColor, weight: FontWeight.w600),
// SizedBox(height: 12.h),
// Row(
// mainAxisAlignment: MainAxisAlignment.start,
// children: [
// Expanded(
// child: Row(
// children: [
// Radio<AmbulanceDirection>(
// value: AmbulanceDirection.ONE_WAY,
// groupValue: directionValue,
// onChanged: (AmbulanceDirection? newValue) {
// if (newValue != null) {
// context
// .read<EmergencyServicesViewModel>()
// .updateDirection(newValue);
// }
// },
// activeColor: AppColors.primaryRedColor,
// fillColor: MaterialStateProperty.all(AppColors.primaryRedColor),
// ),
// LocaleKeys.oneWay.tr(context: context)
// .toText12(color: AppColors.textColor, fontWeight: FontWeight.w500)
// ],
// ).onPress(() {
// context
// .read<EmergencyServicesViewModel>()
// .updateDirection(AmbulanceDirection.ONE_WAY);
// }),
// ),
// Expanded(
// child: Row(
// children: [
// Radio<AmbulanceDirection>(
// value: AmbulanceDirection.TWO_WAY,
// groupValue: directionValue,
// onChanged: (AmbulanceDirection? newValue) {
// if (newValue != null) {
// context
// .read<EmergencyServicesViewModel>()
// .updateDirection(newValue);
// }
// },
// activeColor: AppColors.primaryRedColor,
// fillColor: MaterialStateProperty.all(AppColors.primaryRedColor),
// ),
// LocaleKeys.twoWay.tr(context: context)
// .toText14(color: AppColors.textColor, weight: FontWeight.w500)
// ],
// ).onPress(() {
// context
//
// .read<EmergencyServicesViewModel>()
// .updateDirection(AmbulanceDirection.TWO_WAY);
// }),
// ),
// ],
// ),
// ],
// );
// },
// ),
],
);
},
),
],
),
// Selector<EmergencyServicesViewModel, AmbulanceCallingPlace>(
// selector: (context, viewModel) => viewModel.callingPlace,
// builder: (context, value, _) {
// return ;
// },
// ),
SizedBox(
height: 16.h,
),
CustomButton(
text: LocaleKeys.confirm.tr(context: context),
onPressed: onTap,
backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedColor,
textColor: AppColors.whiteColor,
iconColor: AppColors.whiteColor,
),
// CustomButton(
// text: LocaleKeys.confirm.tr(context: context),
// onPressed: onTap,
// backgroundColor: AppColors.primaryRedColor,
// borderColor: AppColors.primaryRedColor,
// textColor: AppColors.whiteColor,
// iconColor: AppColors.whiteColor,
// ),
],
);
}

@ -1,11 +1,14 @@
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/app_state.dart';
import 'package:hmg_patient_app_new/core/dependencies.dart';
import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
import 'package:hmg_patient_app_new/core/utils/utils.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
import 'package:provider/provider.dart';
class TransportOptionItem extends StatelessWidget {
final String title;
@ -15,6 +18,7 @@ class TransportOptionItem extends StatelessWidget {
final String lastIcon;
final String price;
final VoidCallback onTap;
final bool shouldFlipIcon;
const TransportOptionItem(
{super.key,
@ -24,6 +28,7 @@ class TransportOptionItem extends StatelessWidget {
required this.middleIcon,
required this.lastIcon,
required this.price,
this.shouldFlipIcon = false,
required this.onTap});
@override
@ -39,14 +44,14 @@ class TransportOptionItem extends StatelessWidget {
spacing: 16.h,
children: [
headerSection(),
titleSection(),
titleSection(context),
],
)).onPress((){
onTap();
});
}
titleSection() {
titleSection(BuildContext context) {
return Row(
children: [
Expanded(
@ -55,13 +60,11 @@ class TransportOptionItem extends StatelessWidget {
children: [
title.toText16(
color: AppColors.textColor, weight: FontWeight.w600),
// subTitle.toText12(
// color: AppColors.greyTextColor, fontWeight: FontWeight.w500),
subTitle.toText12(color: AppColors.greyTextColor, fontWeight: FontWeight.w500),
],
),
),
Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_medium, width: 24.h, height: 24.h)
Transform.flip(flipX: getIt.get<AppState>().isArabic(), child: Utils.buildSvgWithAssets(icon: AppAssets.forward_arrow_medium, width: 24.h, height: 24.h))
],
);
}
@ -70,20 +73,19 @@ class TransportOptionItem extends StatelessWidget {
return Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
// Expanded(
// child: Row(
// children: [
// buildIcon(firstIcon),
// Utils.buildSvgWithAssets(
// icon: middleIcon, width: 24.h, height: 24.h).paddingAll(8.h),
// buildIcon(lastIcon)
// ],
// ),
// ),
Utils.getPaymentAmountWithSymbol2(
num.tryParse(price) ?? 0.0,
fontSize: 18.f,
letterSpacing:-2
Expanded(
child: Row(
children: [
Transform.flip(flipX: getIt.get<AppState>().isArabic() && shouldFlipIcon, child: buildIcon(firstIcon)),
// Utils.buildSvgWithAssets(
// icon: middleIcon, width: 24.h, height: 24.h).paddingAll(8.h),
// buildIcon(lastIcon)
],
),
),
Visibility(
visible: price.isNotEmpty,
child: Utils.getPaymentAmountWithSymbol2(num.tryParse(price) ?? 0.0, fontSize: 18.f, letterSpacing: -2),
),
],
);
@ -98,7 +100,7 @@ class TransportOptionItem extends StatelessWidget {
backgroundColor: AppColors.greyColor,
iconColor: AppColors.greyTextColor,
borderColor: Colors.transparent,
height: 40.h,
height: 42.h,
);
}
}

@ -12,6 +12,7 @@ import 'package:hmg_patient_app_new/features/emergency_services/models/OrderDisp
import 'package:hmg_patient_app_new/features/location/location_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/emergency_services/RRT/rrt_request_type_select.dart';
import 'package:hmg_patient_app_new/presentation/emergency_services/call_ambulance/widgets/WayPickup.dart';
import 'package:hmg_patient_app_new/presentation/emergency_services/call_ambulance/widgets/ambulance_option_selection_bottomsheet.dart';
import 'package:hmg_patient_app_new/presentation/emergency_services/call_ambulance/widgets/pickup_location.dart';
import 'package:hmg_patient_app_new/presentation/emergency_services/er_online_checkin/er_online_checkin_home.dart';
@ -26,6 +27,8 @@ import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart';
import 'package:lottie/lottie.dart';
import 'package:provider/provider.dart';
import '../../features/emergency_services/models/AmbulanceCallingPlace.dart' show AmbulanceCallingPlace;
class EmergencyServicesPage extends StatefulWidget {
EmergencyServicesPage({super.key});
@ -440,7 +443,42 @@ class _EmergencyServicesPageState extends State<EmergencyServicesPage> {
openTranportationSelectionBottomSheet(context);
}),
context,
child: PickupLocation(onTap: () {
child: PickupLocation(onTap: (fromLocation) {
Navigator.of(context).pop();
if(fromLocation == AmbulanceCallingPlace.TO_HOSPITAL){
openNumberWayOfSelectionBottomSheet(context);
return;
}
context.read<LocationViewModel>().flushSearchPredictions();
context.read<EmergencyServicesViewModel>().navigateTOAmbulancePage();
}),
isFullScreen: false,
isCloseButtonVisible: true,
hasBottomPadding: false,
backgroundColor: AppColors.bottomSheetBgColor,
callBackFunc: () {},
);
}
openNumberWayOfSelectionBottomSheet(BuildContext context) {
showCommonBottomSheetWithoutHeight(
onCloseClicked: () {
context.read<EmergencyServicesViewModel>().flushPickupInformation();
},
titleWidget: Transform.flip(
flipX: emergencyServicesViewModel.isArabic,
child: Utils.buildSvgWithAssets(
icon: AppAssets.arrow_back,
iconColor: Color(0xff2B353E),
fit: BoxFit.contain,
),
).onPress(() {
context.read<EmergencyServicesViewModel>().flushPickupInformation();
Navigator.pop(context);
openPickupDetailsBottomSheet(context);
}),
context,
child: WayPickup(onTap: () {
Navigator.of(context).pop();
context.read<LocationViewModel>().flushSearchPredictions();
context.read<EmergencyServicesViewModel>().navigateTOAmbulancePage();

@ -8,7 +8,7 @@ class AppColors {
static const transparent = Colors.transparent;
// Scaffold / Background
static Color get scaffoldBgColor => isDarkMode ? dark.scaffoldBgColor : const Color(0xFFF0F0F0);
static Color get scaffoldBgColor => isDarkMode ? dark.scaffoldBgColor : const Color(0xFFF8F8F8);
static Color get bottomSheetBgColor => isDarkMode ? dark.bottomSheetBgColor : const Color(0xFFF8F8FA);
static Color get lightGreyEFColor => isDarkMode ? dark.lightGreyEFColor : const Color(0xffeaeaff);
static Color get greyF7Color => isDarkMode ? dark.greyF7Color : const Color(0xffF7F7F7);

Loading…
Cancel
Save