7/7/1
This commit is contained in:
@@ -54,10 +54,21 @@ class AK {
|
||||
a.r(a.r(a.r(Env.integrationIdPayMobWallet, cn), cC), cs);
|
||||
static final String smsPasswordEgypt =
|
||||
a.r(a.r(a.r(Env.smsPasswordEgypt, cn), cC), cs);
|
||||
static final String ocpApimSubscriptionKey =
|
||||
a.r(a.r(a.r(Env.ocpApimSubscriptionKey, cn), cC), cs);
|
||||
static final String ocpApimSubscriptionKey = Env.ocpApimSubscriptionKey;
|
||||
static final String chatGPTkeySeferNew4 =
|
||||
a.r(a.r(a.r(Env.chatGPTkeySeferNew4, cn), cC), cs);
|
||||
static final String anthropicAIkeySeferNew =
|
||||
a.r(a.r(a.r(Env.anthropicAIkeySeferNew, cn), cC), cs);
|
||||
static final String llama3Key = a.r(a.r(a.r(Env.llama3Key, cn), cC), cs);
|
||||
static final String payMobOutClientSecrret =
|
||||
a.r(a.r(a.r(Env.payMobOutClientSecrret, cn), cC), cs);
|
||||
static final String payMobOutClient_id =
|
||||
a.r(a.r(a.r(Env.payMobOutClient_id, cn), cC), cs);
|
||||
static final String payMobOutPassword =
|
||||
a.r(a.r(a.r(Env.payMobOutPassword, cn), cC), cs);
|
||||
static final String payMobOutUserName =
|
||||
a.r(a.r(a.r(Env.payMobOutUserName, cn), cC), cs);
|
||||
|
||||
///////////
|
||||
static final String keyOfApp = a.r(a.r(a.r(Env.keyOfApp, cn), cC), cs);
|
||||
}
|
||||
|
||||
@@ -1,3 +1,66 @@
|
||||
import '../env/env.dart';
|
||||
|
||||
Map<String, String> cs = {
|
||||
"a": Env.a,
|
||||
"b": Env.b,
|
||||
"c": Env.c,
|
||||
"d": Env.d,
|
||||
"e": Env.e,
|
||||
"f": Env.f,
|
||||
"g": Env.g,
|
||||
"h": Env.h,
|
||||
"i": Env.i,
|
||||
"j": Env.j,
|
||||
"k": Env.k,
|
||||
"l": Env.l,
|
||||
"m": Env.m,
|
||||
"n": Env.n,
|
||||
"o": Env.o,
|
||||
"p": Env.p,
|
||||
"q": Env.q,
|
||||
"r": Env.r,
|
||||
"s": Env.s,
|
||||
"t": Env.t,
|
||||
"u": Env.u,
|
||||
"v": Env.v,
|
||||
"w": Env.w,
|
||||
"x": Env.x,
|
||||
"y": Env.y,
|
||||
"z": Env.z,
|
||||
};
|
||||
Map<String, String> cC = {
|
||||
"A": Env.A,
|
||||
"B": Env.B,
|
||||
"C": Env.C,
|
||||
"D": Env.D,
|
||||
"E": Env.E,
|
||||
"F": Env.F,
|
||||
"G": Env.G,
|
||||
"H": Env.H,
|
||||
"I": Env.I,
|
||||
"J": Env.J,
|
||||
"K": Env.K,
|
||||
"L": Env.L,
|
||||
"M": Env.M,
|
||||
"N": Env.N,
|
||||
"O": Env.O,
|
||||
"P": Env.P,
|
||||
"Q": Env.Q,
|
||||
"R": Env.R,
|
||||
"S": Env.S,
|
||||
"T": Env.T,
|
||||
"U": Env.U,
|
||||
"V": Env.V,
|
||||
"W": Env.W,
|
||||
"X": Env.X,
|
||||
"Y": Env.Y,
|
||||
"Z": Env.Z
|
||||
};
|
||||
|
||||
//
|
||||
|
||||
//
|
||||
|
||||
Map<String, String> cn = {
|
||||
"0": "3",
|
||||
"1": "7",
|
||||
@@ -10,59 +73,3 @@ Map<String, String> cn = {
|
||||
"8": "4",
|
||||
"9": "8"
|
||||
};
|
||||
Map<String, String> cs = {
|
||||
"a": "q",
|
||||
"b": "x",
|
||||
"c": "f",
|
||||
"d": "y",
|
||||
"e": "j",
|
||||
"f": "u",
|
||||
"g": "k",
|
||||
"h": "w",
|
||||
"i": "o",
|
||||
"j": "e",
|
||||
"k": "g",
|
||||
"l": "r",
|
||||
"m": "n",
|
||||
"n": "b",
|
||||
"o": "i",
|
||||
"p": "v",
|
||||
"q": "a",
|
||||
"r": "l",
|
||||
"s": "z",
|
||||
"t": "c",
|
||||
"u": "h",
|
||||
"v": "p",
|
||||
"w": "t",
|
||||
"x": "d",
|
||||
"y": "s",
|
||||
"z": "m"
|
||||
};
|
||||
Map<String, String> cC = {
|
||||
"A": "Q",
|
||||
"B": "X",
|
||||
"C": "F",
|
||||
"D": "Y",
|
||||
"E": "J",
|
||||
"F": "U",
|
||||
"G": "K",
|
||||
"H": "W",
|
||||
"I": "O",
|
||||
"J": "E",
|
||||
"K": "G",
|
||||
"L": "R",
|
||||
"M": "N",
|
||||
"N": "B",
|
||||
"O": "I",
|
||||
"P": "V",
|
||||
"Q": "A",
|
||||
"R": "L",
|
||||
"S": "Z",
|
||||
"T": "C",
|
||||
"U": "H",
|
||||
"V": "P",
|
||||
"W": "T",
|
||||
"X": "D",
|
||||
"Y": "S",
|
||||
"Z": "M"
|
||||
};
|
||||
|
||||
@@ -74,7 +74,7 @@ class LoginController extends GetxController {
|
||||
var jsonDecoeded = jsonDecode(res);
|
||||
if (jsonDecoeded.isNotEmpty) {
|
||||
if (jsonDecoeded['status'] == 'success' &&
|
||||
jsonDecoeded['data'][0]['verified'] == 1) {
|
||||
jsonDecoeded['data'][0]['verified'].toString() == '1') {
|
||||
//
|
||||
box.write(BoxName.isVerified, '1');
|
||||
box.write(BoxName.email, jsonDecoeded['data'][0]['email']);
|
||||
|
||||
@@ -93,15 +93,28 @@ class RegisterController extends GetxController {
|
||||
.post(link: AppLink.checkPhoneNumberISVerfiedPassenger, payload: {
|
||||
'phone_number': '+2${phoneController.text}',
|
||||
});
|
||||
// if (responseCheker != 'failure') {
|
||||
var d = jsonDecode(responseCheker);
|
||||
if (d['message'][0]['verified'].toString() == '1') {
|
||||
Get.snackbar('Phone number is verified before'.tr, '',
|
||||
backgroundColor: AppColor.greenColor);
|
||||
box.write(BoxName.isVerified, '1');
|
||||
box.write(BoxName.phone, '+2${phoneController.text}');
|
||||
Get.offAll(const MapPagePassenger());
|
||||
// }
|
||||
if (responseCheker != 'failure') {
|
||||
var d = jsonDecode(responseCheker);
|
||||
if (d['message'][0]['verified'].toString() == '1') {
|
||||
Get.snackbar('Phone number is verified before'.tr, '',
|
||||
backgroundColor: AppColor.greenColor);
|
||||
box.write(BoxName.isVerified, '1');
|
||||
box.write(BoxName.phone, '+2${phoneController.text}');
|
||||
Get.offAll(const MapPagePassenger());
|
||||
} else {
|
||||
await CRUD().post(link: AppLink.sendVerifyOtpMessage, payload: {
|
||||
'phone_number': '+2${phoneController.text}',
|
||||
'token': randomNumber.toString(),
|
||||
});
|
||||
|
||||
await smsEgyptController.sendSmsEgypt(
|
||||
phoneController.text.toString(), randomNumber.toString());
|
||||
isSent = true;
|
||||
remainingTime = 300; // Reset to 5 minutes
|
||||
startTimer();
|
||||
isLoading = false;
|
||||
update();
|
||||
}
|
||||
} else {
|
||||
await CRUD().post(link: AppLink.sendVerifyOtpMessage, payload: {
|
||||
'phone_number': '+2${phoneController.text}',
|
||||
@@ -115,6 +128,8 @@ class RegisterController extends GetxController {
|
||||
startTimer();
|
||||
isLoading = false;
|
||||
update();
|
||||
|
||||
// Get.snackbar(responseCheker, 'message');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -894,8 +894,9 @@ class MapPassengerController extends GetxController {
|
||||
try {
|
||||
Uri uri = Uri.parse(link);
|
||||
|
||||
if (uri.host == 'maps.google.com') {
|
||||
if (uri.host == 'maps.google.com' || uri.host == 'www.google.com') {
|
||||
String? query = uri.queryParameters['q'];
|
||||
query ??= uri.queryParameters['ll'];
|
||||
|
||||
if (query != null) {
|
||||
List<String> coordinates = query.split(',');
|
||||
@@ -910,6 +911,9 @@ class MapPassengerController extends GetxController {
|
||||
};
|
||||
}
|
||||
}
|
||||
} else if (uri.host == 'goo.gl') {
|
||||
// Shortened URLs might need to be expanded first
|
||||
// Implement additional logic to expand the URL here if necessary
|
||||
}
|
||||
} catch (e) {
|
||||
print('Error parsing WhatsApp location link: $e');
|
||||
@@ -1164,7 +1168,7 @@ class MapPassengerController extends GetxController {
|
||||
}
|
||||
|
||||
void delayAndFetchRideStatus(String rideId) {
|
||||
Timer(const Duration(milliseconds: 200), () async {
|
||||
Timer(const Duration(seconds: 1), () async {
|
||||
if (shouldFetch) {
|
||||
if (remainingTimeToPassengerFromDriverAfterApplied > 0) {
|
||||
var res = await getRideStatus(rideId);
|
||||
@@ -1197,7 +1201,7 @@ class MapPassengerController extends GetxController {
|
||||
}
|
||||
|
||||
void delayAndFetchRideStatusForAllDriverAvailable(String rideId) {
|
||||
Timer(const Duration(milliseconds: 200), () async {
|
||||
Timer(const Duration(milliseconds: 1000), () async {
|
||||
if (shouldFetch) {
|
||||
var res = await getRideStatus(rideId);
|
||||
// var decod = jsonDecode(res);
|
||||
@@ -1532,8 +1536,8 @@ class MapPassengerController extends GetxController {
|
||||
await Future.delayed(const Duration(seconds: 4));
|
||||
if (rideTimerBegin == true || statusRide == 'Apply') {
|
||||
await getDriverCarsLocationToPassengerAfterApplied();
|
||||
reloadMarkerDriverCarsLocationToPassengerAfterApplied();
|
||||
}
|
||||
reloadMarkerDriverCarsLocationToPassengerAfterApplied();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2107,6 +2111,7 @@ class MapPassengerController extends GetxController {
|
||||
|
||||
reloadMarkers() async {
|
||||
if (statusRide == 'wait') {
|
||||
clearMarkersExceptStartEnd();
|
||||
await getCarsLocationByPassengerAndReloadMarker();
|
||||
await getNearestDriverByPassengerLocation();
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import 'package:SEFER/constant/box_name.dart';
|
||||
import 'package:SEFER/views/auth/sms_verfy_page.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:google_maps_flutter/google_maps_flutter.dart';
|
||||
@@ -6,6 +8,7 @@ import '../../../constant/colors.dart';
|
||||
import '../../../constant/credential.dart';
|
||||
import '../../../controller/functions/tts.dart';
|
||||
import '../../../controller/home/map_passenger_controller.dart';
|
||||
import '../../../main.dart';
|
||||
|
||||
GetBuilder<MapPassengerController> leftMainMenuIcons() {
|
||||
final textToSpeechController = Get.put(TextToSpeechController());
|
||||
@@ -82,23 +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 {
|
||||
// makePhoneCall('+201023248456');
|
||||
// },
|
||||
// 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,
|
||||
|
||||
@@ -298,7 +298,7 @@ class RideBeginPassenger extends StatelessWidget {
|
||||
},
|
||||
icon: const Icon(
|
||||
Foundation.record,
|
||||
color: AppColor.yellowColor,
|
||||
color: AppColor.blueColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user