This commit is contained in:
Hamza-Ayed
2024-07-12 22:52:54 +03:00
parent 67b5a20058
commit 8661bd7f3f
4 changed files with 209 additions and 121 deletions

View File

@@ -1367,7 +1367,7 @@ class MapPassengerController extends GetxController {
rotation: double.parse(json['heading']),
icon: json['model'].toString().contains('دراجة')
? motoIcon
: json['gender'] == 'Male'
: json['gender'] == 'Male'.tr
? carIcon
: ladyIcon,
),
@@ -1385,7 +1385,7 @@ class MapPassengerController extends GetxController {
rotation: double.parse(json['heading']),
icon: json['model'].contains('دراجة')
? motoIcon
: json['gender'] == 'Male'
: json['gender'] == 'Male'.tr
? carIcon
: ladyIcon,
);
@@ -1588,7 +1588,7 @@ class MapPassengerController extends GetxController {
? motoIcon
: datadriverCarsLocationToPassengerAfterApplied['message'][0]
['gender'] ==
'Male'
'Male'.tr
? carIcon
: ladyIcon, // Default to carIcon if gender is not Male or Female
);

View File

@@ -267,6 +267,7 @@ iOS [https://getapp.cc/app/6458734951]
"By selecting 'I Agree' below, I have reviewed and agree to the Terms of Use and acknowledge the Privacy Notice. I am at least 18 years of age.":
"من خلال اختيار 'أوافق' أدناه، قمت بمراجعة وقبول شروط الاستخدام وأقر بإشعار الخصوصية. أنا على الأقل 18 عامًا.",
"I Agree": "أوافق",
"Finish Monitor": " إنهاء مراقبة الرحلة ",
"First name": "الاسم الأول",
"Enter your first name": "أدخل اسمك الأول",
"Please enter your first name.": "يرجى إدخال اسمك الأول.",

View File

@@ -1,3 +1,4 @@
import 'package:SEFER/views/widgets/my_dialog.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
@@ -29,108 +30,194 @@ class GoogleMapPassengerWidget extends StatelessWidget {
cameraTargetBounds: CameraTargetBounds(controller.boundsdata),
minMaxZoomPreference: const MinMaxZoomPreference(6, 18),
onLongPress: (argument) {
Get.defaultDialog(
title: 'Are you want to go to this site'.tr,
content: Column(
children: [
Text('${argument.latitude},${argument.longitude}'),
],
),
confirm: MyElevatedButton(
title: 'Ok'.tr,
onPressed: () async {
controller.clearPolyline();
if (controller.dataCarsLocationByPassenger != null) {
await controller.getMap(
'${controller.passengerLocation.latitude},${controller.passengerLocation.longitude}',
'${argument.latitude.toString()},${argument.longitude.toString()}');
MyDialog().getDialog('Are you want to go to this site'.tr, '',
() async {
controller.clearPolyline();
if (controller.dataCarsLocationByPassenger != null) {
await controller.getMap(
'${controller.passengerLocation.latitude},${controller.passengerLocation.longitude}',
'${argument.latitude.toString()},${argument.longitude.toString()}');
Get.back();
controller.bottomSheet();
controller.showBottomSheet1();
} else {
Get.back();
Get.snackbar(
'We Are Sorry That we dont have cars in your Location!'
.tr,
'',
colorText: AppColor.redColor,
duration: const Duration(seconds: 11),
instantInit: true,
snackPosition: SnackPosition.TOP,
titleText: Text(
'Error'.tr,
style:
const TextStyle(color: AppColor.redColor),
),
messageText: Text(
'We Are Sorry That we dont have cars in your Location!'
.tr,
style: AppStyle.title,
),
icon: const Icon(Icons.error),
shouldIconPulse: true,
maxWidth: double.infinity,
margin: const EdgeInsets.all(16),
padding: const EdgeInsets.all(16),
borderRadius: 8,
borderColor: AppColor.redColor,
borderWidth: 2,
backgroundColor: AppColor.secondaryColor,
leftBarIndicatorColor: AppColor.redColor,
boxShadows: [
BoxShadow(
color: Colors.black.withOpacity(0.25),
blurRadius: 4,
spreadRadius: 2,
offset: const Offset(0, 4),
),
],
backgroundGradient: const LinearGradient(
colors: [
AppColor.redColor,
AppColor.accentColor
],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
),
// mainButton: TextButton(
// onPressed: () {
// controller.getCarsLocationByPassenger();
// },
// child: Text(
// 'Try Again'.tr,
// style: const TextStyle(
// color: AppColor.secondaryColor),
// ),
// ),
onTap: (GetSnackBar snackBar) {
// Do something when the snackbar is tapped.
},
isDismissible: true,
showProgressIndicator: false,
dismissDirection: DismissDirection.up,
progressIndicatorController: null,
progressIndicatorBackgroundColor:
Colors.transparent,
progressIndicatorValueColor: null,
snackStyle: SnackStyle.GROUNDED,
forwardAnimationCurve: Curves.easeInToLinear,
reverseAnimationCurve: Curves.easeInOut,
animationDuration:
const Duration(milliseconds: 4000),
barBlur: 8,
overlayBlur: 0,
snackbarStatus: null,
overlayColor:
AppColor.primaryColor.withOpacity(0.5),
userInputForm: null,
);
}
Get.back();
controller.bottomSheet();
controller.showBottomSheet1();
} else {
Get.back();
Get.snackbar(
'We Are Sorry That we dont have cars in your Location!'
.tr,
'',
colorText: AppColor.redColor,
duration: const Duration(seconds: 11),
instantInit: true,
snackPosition: SnackPosition.TOP,
titleText: Text(
'Error'.tr,
style: const TextStyle(color: AppColor.redColor),
),
messageText: Text(
'We Are Sorry That we dont have cars in your Location!'
.tr,
style: AppStyle.title,
),
icon: const Icon(Icons.error),
shouldIconPulse: true,
maxWidth: double.infinity,
margin: const EdgeInsets.all(16),
padding: const EdgeInsets.all(16),
borderRadius: 8,
borderColor: AppColor.redColor,
borderWidth: 2,
backgroundColor: AppColor.secondaryColor,
leftBarIndicatorColor: AppColor.redColor,
boxShadows: [
BoxShadow(
color: Colors.black.withOpacity(0.25),
blurRadius: 4,
spreadRadius: 2,
offset: const Offset(0, 4),
),
],
backgroundGradient: const LinearGradient(
colors: [AppColor.redColor, AppColor.accentColor],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
),
// mainButton: TextButton(
// onPressed: () {
// controller.getCarsLocationByPassenger();
// },
// child: Text(
// 'Try Again'.tr,
// style: const TextStyle(
// color: AppColor.secondaryColor),
// ),
// ),
onTap: (GetSnackBar snackBar) {
// Do something when the snackbar is tapped.
},
isDismissible: true,
showProgressIndicator: false,
dismissDirection: DismissDirection.up,
progressIndicatorController: null,
progressIndicatorBackgroundColor: Colors.transparent,
progressIndicatorValueColor: null,
snackStyle: SnackStyle.GROUNDED,
forwardAnimationCurve: Curves.easeInToLinear,
reverseAnimationCurve: Curves.easeInOut,
animationDuration: const Duration(milliseconds: 4000),
barBlur: 8,
overlayBlur: 0,
snackbarStatus: null,
overlayColor: AppColor.primaryColor.withOpacity(0.5),
userInputForm: null,
);
}
//
}),
);
//
});
// Get.defaultDialog(
// title: 'Are you want to go to this site'.tr,
// content: Column(
// children: [
// Text('${argument.latitude},${argument.longitude}'),
// ],
// ),
// confirm: MyElevatedButton(
// title: 'Ok'.tr,
// onPressed: () async {
// controller.clearPolyline();
// if (controller.dataCarsLocationByPassenger != null) {
// await controller.getMap(
// '${controller.passengerLocation.latitude},${controller.passengerLocation.longitude}',
// '${argument.latitude.toString()},${argument.longitude.toString()}');
// Get.back();
// controller.bottomSheet();
// controller.showBottomSheet1();
// } else {
// Get.back();
// Get.snackbar(
// 'We Are Sorry That we dont have cars in your Location!'
// .tr,
// '',
// colorText: AppColor.redColor,
// duration: const Duration(seconds: 11),
// instantInit: true,
// snackPosition: SnackPosition.TOP,
// titleText: Text(
// 'Error'.tr,
// style:
// const TextStyle(color: AppColor.redColor),
// ),
// messageText: Text(
// 'We Are Sorry That we dont have cars in your Location!'
// .tr,
// style: AppStyle.title,
// ),
// icon: const Icon(Icons.error),
// shouldIconPulse: true,
// maxWidth: double.infinity,
// margin: const EdgeInsets.all(16),
// padding: const EdgeInsets.all(16),
// borderRadius: 8,
// borderColor: AppColor.redColor,
// borderWidth: 2,
// backgroundColor: AppColor.secondaryColor,
// leftBarIndicatorColor: AppColor.redColor,
// boxShadows: [
// BoxShadow(
// color: Colors.black.withOpacity(0.25),
// blurRadius: 4,
// spreadRadius: 2,
// offset: const Offset(0, 4),
// ),
// ],
// backgroundGradient: const LinearGradient(
// colors: [
// AppColor.redColor,
// AppColor.accentColor
// ],
// begin: Alignment.topLeft,
// end: Alignment.bottomRight,
// ),
// // mainButton: TextButton(
// // onPressed: () {
// // controller.getCarsLocationByPassenger();
// // },
// // child: Text(
// // 'Try Again'.tr,
// // style: const TextStyle(
// // color: AppColor.secondaryColor),
// // ),
// // ),
// onTap: (GetSnackBar snackBar) {
// // Do something when the snackbar is tapped.
// },
// isDismissible: true,
// showProgressIndicator: false,
// dismissDirection: DismissDirection.up,
// progressIndicatorController: null,
// progressIndicatorBackgroundColor:
// Colors.transparent,
// progressIndicatorValueColor: null,
// snackStyle: SnackStyle.GROUNDED,
// forwardAnimationCurve: Curves.easeInToLinear,
// reverseAnimationCurve: Curves.easeInOut,
// animationDuration:
// const Duration(milliseconds: 4000),
// barBlur: 8,
// overlayBlur: 0,
// snackbarStatus: null,
// overlayColor:
// AppColor.primaryColor.withOpacity(0.5),
// userInputForm: null,
// );
// }
// //
// }),
// );
},
onTap: (argument) {

View File

@@ -85,24 +85,24 @@ GetBuilder<MapPassengerController> leftMainMenuIcons() {
const SizedBox(
width: 5,
),
AnimatedContainer(
duration: const Duration(microseconds: 200),
width: controller.widthMapTypeAndTraffic,
decoration: BoxDecoration(
color: AppColor.secondaryColor,
border: Border.all(),
borderRadius: BorderRadius.circular(15)),
child: IconButton(
onPressed: () async {
box.remove(BoxName.isVerified);
Get.to(() => SmsSignupEgypt());
},
icon: const Icon(
Icons.voice_chat,
size: 29,
),
),
),
// AnimatedContainer(
// duration: const Duration(microseconds: 200),
// width: controller.widthMapTypeAndTraffic,
// decoration: BoxDecoration(
// color: AppColor.secondaryColor,
// border: Border.all(),
// borderRadius: BorderRadius.circular(15)),
// child: IconButton(
// onPressed: () async {
// box.remove(BoxName.isVerified);
// Get.to(() => SmsSignupEgypt());
// },
// icon: const Icon(
// Icons.voice_chat,
// size: 29,
// ),
// ),
// ),
// AnimatedContainer(
// duration: const Duration(microseconds: 200),
// width: controller.widthMapTypeAndTraffic,