25-1/13/1-securejordan

This commit is contained in:
Hamza-Ayed
2025-01-13 22:10:47 +03:00
parent e8c3f8f339
commit a893e49282
36 changed files with 803 additions and 447 deletions

View File

@@ -6,6 +6,8 @@ import '../../../../controller/auth/captin/history_captain.dart';
import 'package:flutter/cupertino.dart';
import 'package:get/get.dart';
import '../../../../controller/functions/encrypt_decrypt.dart';
class HistoryCaptain extends StatelessWidget {
const HistoryCaptain({super.key});
@@ -78,7 +80,8 @@ class HistoryCaptain extends StatelessWidget {
.navTitleTextStyle,
),
Text(
list['order_id'],
encryptionHelper
.decryptData(list['order_id']),
style: CupertinoTheme.of(context)
.textTheme
.textStyle,
@@ -105,14 +108,18 @@ class HistoryCaptain extends StatelessWidget {
),
Text(
list['status'],
style: list['status'] == 'Apply'
style: encryptionHelper.decryptData(
list['status']) ==
'Apply'
? CupertinoTheme.of(context)
.textTheme
.navTitleTextStyle
.copyWith(
color: CupertinoColors
.systemGreen)
: list['status'] == 'Refused'
: encryptionHelper.decryptData(
list['status']) ==
'Refused'
? CupertinoTheme.of(context)
.textTheme
.navTitleTextStyle

View File

@@ -7,6 +7,8 @@ import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:flutter/cupertino.dart';
import '../../../../controller/functions/encrypt_decrypt.dart';
class HistoryDetailsPage extends StatelessWidget {
HistoryDetailsPage({super.key});
HistoryCaptainController historyCaptainController =
@@ -44,7 +46,7 @@ class HistoryDetailsPage extends StatelessWidget {
CupertinoButton(
onPressed: () {
String mapUrl =
'https://www.google.com/maps/dir/${res['start_location']}/${res['end_location']}/';
'https://www.google.com/maps/dir/${encryptionHelper.decryptData(res['start_location'])}/${encryptionHelper.decryptData(res['end_location'])}/';
showInBrowser(mapUrl);
},
child: Container(
@@ -77,18 +79,26 @@ class HistoryDetailsPage extends StatelessWidget {
polylineId: const PolylineId('route'),
points: [
LatLng(
double.parse(res['start_location']
double.parse(encryptionHelper
.decryptData(
res['start_location'])
.toString()
.split(',')[0]),
double.parse(res['start_location']
double.parse(encryptionHelper
.decryptData(
res['start_location'])
.toString()
.split(',')[1]),
),
LatLng(
double.parse(res['end_location']
double.parse(encryptionHelper
.decryptData(
res['end_location'])
.toString()
.split(',')[0]),
double.parse(res['end_location']
double.parse(encryptionHelper
.decryptData(
res['end_location'])
.toString()
.split(',')[1]),
)
@@ -105,7 +115,7 @@ class HistoryDetailsPage extends StatelessWidget {
MainAxisAlignment.spaceBetween,
children: [
Text(
'${'Order ID'.tr} ${res['id']}',
'${'Order ID'.tr} ${encryptionHelper.decryptData(res['id'])}',
style: CupertinoTheme.of(context)
.textTheme
.navActionTextStyle,
@@ -135,13 +145,13 @@ class HistoryDetailsPage extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'${'Price is'.tr} ${res['price_for_driver']}',
'${'Price is'.tr} ${encryptionHelper.decryptData(res['price_for_driver'])}',
style: CupertinoTheme.of(context)
.textTheme
.textStyle,
),
Text(
'${'Distance is'.tr} ${res['distance']} KM',
'${'Distance is'.tr} ${encryptionHelper.decryptData(res['distance'])} KM',
style: CupertinoTheme.of(context)
.textTheme
.textStyle,
@@ -200,7 +210,7 @@ class HistoryDetailsPage extends StatelessWidget {
),
child: Center(
child: Text(
'${'Passenger Name is'.tr} ${res['first_name']} ${res['last_name']}',
'${'Passenger Name is'.tr} ${encryptionHelper.decryptData(res['first_name'])} ${encryptionHelper.decryptData(res['last_name'])}',
style: CupertinoTheme.of(context)
.textTheme
.textStyle,
@@ -219,7 +229,7 @@ class HistoryDetailsPage extends StatelessWidget {
),
child: Center(
child: Text(
'${'Status is'.tr} ${res['status']}',
'${'Status is'.tr} ${encryptionHelper.decryptData(res['status'])}',
style: CupertinoTheme.of(context)
.textTheme
.textStyle,