25-1/29/1

This commit is contained in:
Hamza-Ayed
2025-01-29 13:24:29 +03:00
parent f217b5a34f
commit b00fa8b903
60 changed files with 1031 additions and 1027 deletions

View File

@@ -53,7 +53,7 @@ class LoginController extends GetxController {
if (res != 'failure') {
var d = jsonDecode(res);
isTest = d['message'][0]['isTest'];
isTest = int.parse(d['message'][0]['isTest'].toString());
update();
} else {
return false;
@@ -108,10 +108,12 @@ class LoginController extends GetxController {
box.write(BoxName.validity, d['validity']);
box.write(BoxName.isInstall, d['isInstall'] ?? 'none');
box.write(BoxName.isGiftToken, d['isGiftToken'] ?? 'none');
box.write(
BoxName.inviteCode,
encryptionHelper.decryptData(d['inviteCode'].toString()) ??
'none');
d['inviteCode'] != null
? box.write(
BoxName.inviteCode,
encryptionHelper.decryptData(d['inviteCode'].toString()) ??
'none')
: null;
var token = await CRUD().get(link: AppLink.getTokens, payload: {
'passengerID': box.read(BoxName.passengerID).toString()
@@ -230,12 +232,11 @@ class LoginController extends GetxController {
void login() async {
isloading = true;
update();
var res = await CRUD().get(
link: AppLink.loginFromGooglePassenger,
payload: {
'email': emailController.text,
'id': passwordController.text
});
var res =
await CRUD().get(link: AppLink.loginFromGooglePassenger, payload: {
'email': encryptionHelper.encryptData(emailController.text),
'id': passwordController.text
});
isloading = false;
update();
@@ -249,7 +250,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']);

View File

@@ -213,11 +213,11 @@ class RegisterController extends GetxController {
var payload = {
'id': box.read(BoxName.passengerID),
'phone': encryptionHelper.decryptData(phoneController.text),
'phone': encryptionHelper.encryptData(phoneController.text),
'email': box.read(BoxName.email),
'password': encryptionHelper.encryptData('unknown'),
'gender': encryptionHelper.encryptData('unknown'),
'birthdate': '2002-01-01',
'birthdate': encryptionHelper.encryptData('2002-01-01'),
'site': box.read(BoxName.passengerPhotoUrl) ?? 'unknown',
'first_name': encryptionHelper.encryptData(firstName),
'last_name': encryptionHelper.encryptData(lastName),

View File

@@ -60,6 +60,9 @@ class CRUD {
if (response.statusCode == 200) {
try {
// Log.print('req: ${response.request}');
// Log.print('response: ${response.body}');
// Log.print('payload: ${payload}');
var jsonData = jsonDecode(response.body);
if (jsonData['status'] == 'success') {

View File

@@ -35,7 +35,7 @@ class AppInitializer {
Future<void> initializeApp() async {
await getKey();
await getAIKey('FCM_PRIVATE_KEY');
// await getAIKey('FCM_PRIVATE_KEY');
}
getAIKey(String key) async {

View File

@@ -2889,7 +2889,7 @@ class MapPassengerController extends GetxController {
style: AppStyle.title,
),
Text(
"Send SPEED app to him".tr,
"Send Tripz app to him".tr,
style: AppStyle.title.copyWith(color: AppColor.greenColor),
)
],
@@ -2903,7 +2903,7 @@ class MapPassengerController extends GetxController {
: '+962${box.read(BoxName.sosPhonePassenger)}';
var message = '''Dear ,
🚀 I have just started an exciting trip and I would like to share the details of my journey and my current location with you in real-time! Please download the SPEED app. It will allow you to view my trip details and my latest location.
🚀 I have just started an exciting trip and I would like to share the details of my journey and my current location with you in real-time! Please download the Tripz app. It will allow you to view my trip details and my latest location.
👉 Download link:
Android [https://play.google.com/store/apps/details?id=com.mobileapp.store.ride]
@@ -2911,7 +2911,7 @@ class MapPassengerController extends GetxController {
I look forward to keeping you close during my adventure!
SPEED ,'''
Tripz ,'''
.tr;
launchCommunication('whatsapp', phone, message);
}),

View File

@@ -39,9 +39,9 @@ class InviteController extends GetxController {
Future<void> shareDriverCode() async {
if (driverCouponCode != null) {
final String shareText = '''
Join SWIFTI as a driver using my referral code!
Join Tripz as a driver using my referral code!
Use code: $driverCouponCode
Download the SWIFTI Driver app now and earn rewards!
Download the Tripz Driver app now and earn rewards!
''';
await Share.share(shareText);
}
@@ -50,9 +50,9 @@ Download the SWIFTI Driver app now and earn rewards!
Future<void> sharePassengerCode() async {
if (couponCode != null) {
final String shareText = '''
Get a discount on your first SWIFTI ride!
Get a discount on your first Tripz ride!
Use my referral code: $couponCode
Download the SWIFTI app now and enjoy your ride!
Download the Tripz app now and enjoy your ride!
''';
await Share.share(shareText);
}
@@ -277,7 +277,7 @@ Download the SWIFTI app now and enjoy your ride!
var d = response;
Get.snackbar('Success', 'Invite sent successfully'.tr);
String message = '${'*SWIFTI APP CODE*'.tr}\n\n'
String message = '${'*Tripz APP CODE*'.tr}\n\n'
'${"Use this code in registration".tr}\n'
'${"To get a gift for both".tr}\n\n'
'${"The period of this code is 1 hour".tr}\n\n'

File diff suppressed because it is too large Load Diff