This commit is contained in:
Hamza-Ayed
2024-07-05 23:46:05 +03:00
parent dc4677a6bf
commit 23ecaba97c
17 changed files with 310 additions and 225 deletions

56
.env
View File

@@ -39,8 +39,62 @@ payMobOutClientSecrret='xyjjRlahJM0Xc38WjApCOh8bvgL9slFpNdM9YeCu9AhLqboKMPtmSvc2
payMobOutClient_id='Z05ut48dVkS2gI2zenFFcKsfDKfHAU0WELqKyJ0LXrXlBl' payMobOutClient_id='Z05ut48dVkS2gI2zenFFcKsfDKfHAU0WELqKyJ0LXrXlBl'
payMobOutPassword='D2zJFxkE#LN3vz38z2dYxpNfWXrXlBl' payMobOutPassword='D2zJFxkE#LN3vz38z2dYxpNfWXrXlBl'
payMobOutUserName='zjujl_qvo_fwjfgjlXrXlBl' payMobOutUserName='zjujl_qvo_fwjfgjlXrXlBl'
keyOfApp=nqryjp@1737wqnmqqsjyzjujljksvceiXrXlBl
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
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
# #
#basicAuthCredentials= q9XDwNb2SWHU9nq0tIqWYIN+bvXt54jPVrBFOZUstsnk3Ndz2BOSI3wLC3GKMuqE #basicAuthCredentials= q9XDwNb2SWHU9nq0tIqWYIN+bvXt54jPVrBFOZUstsnk3Ndz2BOSI3wLC3GKMuqE
#basicCompareFaces= ZK2RkvTEAi0ihtR0GuJ+H2bmU1OVn5V/f9NLVoKZZdE= #basicCompareFaces= ZK2RkvTEAi0ihtR0GuJ+H2bmU1OVn5V/f9NLVoKZZdE=
@@ -58,7 +112,7 @@ payMobOutUserName='zjujl_qvo_fwjfgjlXrXlBl'
#secretKey= PNwYqtlLcDMlmKbzy3++wSPC/XB9WX2t+zfrJDsYz7LXD5jVFUGs3CXUF227VDGPe1sk10yMGLM4E818969GF7/qhZjLzwF8qXLAEpUhtGniQ+undfoiJw2vNfB4lXWKgQQC4N+/6KPb7zSZx8o8yVlvL/5iZiuf1LYhUhjJmJE= #secretKey= PNwYqtlLcDMlmKbzy3++wSPC/XB9WX2t+zfrJDsYz7LXD5jVFUGs3CXUF227VDGPe1sk10yMGLM4E818969GF7/qhZjLzwF8qXLAEpUhtGniQ+undfoiJw2vNfB4lXWKgQQC4N+/6KPb7zSZx8o8yVlvL/5iZiuf1LYhUhjJmJE=
#stripe_publishableKe= gyXxuOp+vaGcRTTBohZeTaK7HEhpNUVvWGcBNABhzHu125y6ftOwvf1Z8fYlfaG/ysClJpqfxBU8+RulI7KhtJM5mVrmALFiypv/6IlkACsundM6zkbxQGHzjfQdrfkdFZF00fpYjOI/3P/znZIlKGYYLmdxUqF3chAfYDet1/I= #stripe_publishableKe= gyXxuOp+vaGcRTTBohZeTaK7HEhpNUVvWGcBNABhzHu125y6ftOwvf1Z8fYlfaG/ysClJpqfxBU8+RulI7KhtJM5mVrmALFiypv/6IlkACsundM6zkbxQGHzjfQdrfkdFZF00fpYjOI/3P/znZIlKGYYLmdxUqF3chAfYDet1/I=
#llamaKey= a3oCdxMeaKjatKyLQEnPMLqFmfLe9mCGRofsROVQ6NF7SCqxOt7h2A/KvdYWGBM42SxNTuWIq5+UsnPulqKbd3yVTRnG+Lx0rxPa+9mc48frICnl+hz6CSmJjOjDhHnE #llamaKey= a3oCdxMeaKjatKyLQEnPMLqFmfLe9mCGRofsROVQ6NF7SCqxOt7h2A/KvdYWGBM42SxNTuWIq5+UsnPulqKbd3yVTRnG+Lx0rxPa+9mc48frICnl+hz6CSmJjOjDhHnE
#serverPHP= blf8gn/gV8/mvMZlPdJMnSu+ATBZfBThpVjNb9mzXT7OfBrBSZnCBxveUsCcXUW3 #serverPHP= bWjMqX8G7gUyLhrQ85zAXSe2YLffF62PaPHyYK1WcQTPTjcj2+sRswzOU1XPVu+n
#cohere= SvRbfrRc+Gyyy20otHDz1cNNcQpoMyLm+TIkTyfZI7vnxkgsEYiGdYOJ0Punkz6JdY4qa3B0fu2OCZ7NOa6Y1w== #cohere= SvRbfrRc+Gyyy20otHDz1cNNcQpoMyLm+TIkTyfZI7vnxkgsEYiGdYOJ0Punkz6JdY4qa3B0fu2OCZ7NOa6Y1w==
#claudeAiAPI= oO1ZcIFPBgin9gQs5vNT/oDs0KpJDVnjwXqKjCAABoezFxLUpAMINvSNruW7DFU2mbsjpJTDwpTzddsMCIPqi7AjzBpW6X1ddxYX+ZPuJ55Kymj5KvTHAwYYhW7F3l9sOjrtODWwhH6uGTNfh3Ftz531Xb2Qr5d3rKDC4H5tkFM= #claudeAiAPI= oO1ZcIFPBgin9gQs5vNT/oDs0KpJDVnjwXqKjCAABoezFxLUpAMINvSNruW7DFU2mbsjpJTDwpTzddsMCIPqi7AjzBpW6X1ddxYX+ZPuJ55Kymj5KvTHAwYYhW7F3l9sOjrtODWwhH6uGTNfh3Ftz531Xb2Qr5d3rKDC4H5tkFM=
#payPalClientId= VmMsEn1Kz4wCqCnWOm+XoUE2k2c7wA9y2cHqe303GSR9HfnuDqpbcijBYDs5EGYsYF/t68M1xlAp1OX+oXSN3RSsjKelJmbbreg8YtjTeErMVOSGHrsOHRY7hqlUYvmN8DUTlRTFvIdTX+RafY2LiA== #payPalClientId= VmMsEn1Kz4wCqCnWOm+XoUE2k2c7wA9y2cHqe303GSR9HfnuDqpbcijBYDs5EGYsYF/t68M1xlAp1OX+oXSN3RSsjKelJmbbreg8YtjTeErMVOSGHrsOHRY7hqlUYvmN8DUTlRTFvIdTX+RafY2LiA==

View File

@@ -21,7 +21,7 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>45</string> <string>46</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleURLTypes</key> <key>CFBundleURLTypes</key>
@@ -36,7 +36,7 @@
</dict> </dict>
</array> </array>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>4.0.45</string> <string>4.0.46</string>
<key>FirebaseAppDelegateProxyEnabled</key> <key>FirebaseAppDelegateProxyEnabled</key>
<string>NO</string> <string>NO</string>
<key>GMSApiKey</key> <key>GMSApiKey</key>

View File

@@ -68,6 +68,9 @@ class AK {
a.r(a.r(a.r(Env.payMobOutPassword, cn), cC), cs); a.r(a.r(a.r(Env.payMobOutPassword, cn), cC), cs);
static final String payMobOutUserName = static final String payMobOutUserName =
a.r(a.r(a.r(Env.payMobOutUserName, cn), cC), cs); 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);
} }
// //

View File

@@ -1,3 +1,5 @@
import 'package:SEFER/env/env.dart';
Map<String, String> cn = { Map<String, String> cn = {
"0": "3", "0": "3",
"1": "7", "1": "7",
@@ -11,58 +13,58 @@ Map<String, String> cn = {
"9": "8" "9": "8"
}; };
Map<String, String> cs = { Map<String, String> cs = {
"a": "q", "a": Env.a,
"b": "x", "b": Env.b,
"c": "f", "c": Env.c,
"d": "y", "d": Env.d,
"e": "j", "e": Env.e,
"f": "u", "f": Env.f,
"g": "k", "g": Env.g,
"h": "w", "h": Env.h,
"i": "o", "i": Env.i,
"j": "e", "j": Env.j,
"k": "g", "k": Env.k,
"l": "r", "l": Env.l,
"m": "n", "m": Env.m,
"n": "b", "n": Env.n,
"o": "i", "o": Env.o,
"p": "v", "p": Env.p,
"q": "a", "q": Env.q,
"r": "l", "r": Env.r,
"s": "z", "s": Env.s,
"t": "c", "t": Env.t,
"u": "h", "u": Env.u,
"v": "p", "v": Env.v,
"w": "t", "w": Env.w,
"x": "d", "x": Env.x,
"y": "s", "y": Env.y,
"z": "m" "z": Env.z,
}; };
Map<String, String> cC = { Map<String, String> cC = {
"A": "Q", "A": Env.A,
"B": "X", "B": Env.B,
"C": "F", "C": Env.C,
"D": "Y", "D": Env.D,
"E": "J", "E": Env.E,
"F": "U", "F": Env.F,
"G": "K", "G": Env.G,
"H": "W", "H": Env.H,
"I": "O", "I": Env.I,
"J": "E", "J": Env.J,
"K": "G", "K": Env.K,
"L": "R", "L": Env.L,
"M": "N", "M": Env.M,
"N": "B", "N": Env.N,
"O": "I", "O": Env.O,
"P": "V", "P": Env.P,
"Q": "A", "Q": Env.Q,
"R": "L", "R": Env.R,
"S": "Z", "S": Env.S,
"T": "C", "T": Env.T,
"U": "H", "U": Env.U,
"V": "P", "V": Env.V,
"W": "T", "W": Env.W,
"X": "D", "X": Env.X,
"Y": "S", "Y": Env.Y,
"Z": "M" "Z": Env.Z
}; };

View File

@@ -12,7 +12,7 @@ class AC {
if (box.read(BoxName.apiKeyRun).toString() != 'run') { if (box.read(BoxName.apiKeyRun).toString() != 'run') {
var res = await CRUD().get(link: AppLink.getApiKey, payload: {}); var res = await CRUD().get(link: AppLink.getApiKey, payload: {});
var decod = jsonDecode(res); var decod = jsonDecode(res);
print(decod); // print(decod);
Map<String, dynamic> jsonData = {}; Map<String, dynamic> jsonData = {};
for (var i = 0; i < decod['message'].length; i++) { for (var i = 0; i < decod['message'].length; i++) {
String h = decod['message'][i]['hashed_key'].toString(); String h = decod['message'][i]['hashed_key'].toString();

View File

@@ -1,14 +1,14 @@
class AppInformation { class AppInformation {
static const String companyName = 'Mobile-App'; static const String companyName = 'SEFER LLC';
static const String appName = 'SEFER'; static const String appName = 'SEFER';
static const String appVersion = 'SEFER Captain';
static const String phoneNumber = '962798583052'; static const String phoneNumber = '962798583052';
static const String linkedInProfile = static const String linkedInProfile =
'https://www.linkedin.com/in/hamza-ayed/'; 'https://www.linkedin.com/in/hamza-ayed/';
static const String website = 'https://mobile-app.store'; static const String website = 'https://sefer.live';
static const String email = 'hamzaayed@mobile-app.store'; static const String email = 'hamzaayed@sefer.live';
static const String privacyPolicy = static const String privacyPolicy = '''
'''
<body monica-version="2.4.0" monica-id="ofpnmcalabcbjgholdjcjblkibolbppb"> <body monica-version="2.4.0" monica-id="ofpnmcalabcbjgholdjcjblkibolbppb">

View File

@@ -206,6 +206,7 @@ class AppLink {
static String authCaptin = '$server/auth/captin'; static String authCaptin = '$server/auth/captin';
static String loginCaptin = "$authCaptin/login.php"; static String loginCaptin = "$authCaptin/login.php";
static String loginFromGoogleCaptin = "$authCaptin/loginFromGoogle.php"; static String loginFromGoogleCaptin = "$authCaptin/loginFromGoogle.php";
static String packageInfo = "$server/auth/packageInfo.php";
static String signUpCaptin = "$authCaptin/register.php"; static String signUpCaptin = "$authCaptin/register.php";
static String sendVerifyEmailCaptin = "$authCaptin/sendVerifyEmail.php"; static String sendVerifyEmailCaptin = "$authCaptin/sendVerifyEmail.php";
static String sendVerifyOtpMessage = static String sendVerifyOtpMessage =

View File

@@ -42,9 +42,9 @@ class AppStyle {
static BoxDecoration boxDecoration = const BoxDecoration( static BoxDecoration boxDecoration = const BoxDecoration(
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: AppColor.accentColor, blurRadius: 5, offset: Offset(2, 4)), color: AppColor.accentColor, blurRadius: 2, offset: Offset(1, 2)),
BoxShadow( BoxShadow(
color: AppColor.accentColor, blurRadius: 5, offset: Offset(-2, -2)) color: AppColor.accentColor, blurRadius: 2, offset: Offset(-1, -1))
], ],
color: AppColor.secondaryColor, color: AppColor.secondaryColor,
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
@@ -53,9 +53,9 @@ class AppStyle {
static BoxDecoration boxDecoration1 = const BoxDecoration( static BoxDecoration boxDecoration1 = const BoxDecoration(
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: AppColor.accentColor, blurRadius: 5, offset: Offset(2, 4)), color: AppColor.accentColor, blurRadius: 2, offset: Offset(1, 2)),
BoxShadow( BoxShadow(
color: AppColor.accentColor, blurRadius: 5, offset: Offset(-2, -2)) color: AppColor.accentColor, blurRadius: 2, offset: Offset(-1, -1))
], ],
color: AppColor.secondaryColor, color: AppColor.secondaryColor,
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(

View File

@@ -1,21 +1,19 @@
import 'package:encrypt/encrypt.dart' as encrypt;
import 'dart:convert'; import 'dart:convert';
import 'package:http/http.dart' as http; import 'package:encrypt/encrypt.dart' as encrypt;
// import '../../constant/api_key.dart';
import 'dart:convert';
import 'dart:math';
import 'package:encrypt/encrypt.dart' as encrypt;
class KeyEncryption { class KeyEncryption {
static final _key = encrypt.Key.fromUtf8('mehmetDEV@2101'); // ضع مفتاحك هنا // استخدم مفتاح بطول 32 حرفًا
static final _key = encrypt.Key.fromUtf8(AK.keyOfApp);
static final _iv =
encrypt.IV.fromLength(16); // توليد تهيئة عشوائية بطول 16 بايت
static String encryptKey(String key) { static String encryptKey(String key) {
final iv = encrypt.IV.fromLength(16); // توليد تهيئة عشوائية
final encrypter = final encrypter =
encrypt.Encrypter(encrypt.AES(_key, mode: encrypt.AESMode.cbc)); encrypt.Encrypter(encrypt.AES(_key, mode: encrypt.AESMode.cbc));
final encrypted = encrypter.encrypt(key, iv: iv); final encrypted = encrypter.encrypt(key, iv: _iv);
final result = iv.bytes + encrypted.bytes; // تضمين التهيئة مع النص المشفر final result = _iv.bytes + encrypted.bytes; // تضمين التهيئة مع النص المشفر
return base64Encode(result); return base64Encode(result);
} }
@@ -29,55 +27,3 @@ class KeyEncryption {
return encrypter.decrypt(encrypted, iv: iv); return encrypter.decrypt(encrypted, iv: iv);
} }
} }
// class KeyEncryption {
// static final _key = encrypt.Key.fromUtf8('7'); // ضع مفتاحك هنا
//
// static String encryptKey(String key) {
// final iv = encrypt.IV.fromLength(16); // توليد تهيئة عشوائية
// final encrypter =
// encrypt.Encrypter(encrypt.AES(_key, mode: encrypt.AESMode.cbc));
// final encrypted = encrypter.encrypt(key, iv: iv);
// final result = iv.bytes + encrypted.bytes; // تضمين التهيئة مع النص المشفر
// return base64Encode(result);
// }
//
// static String decryptKey(String encryptedKey) {
// final decoded = base64Decode(encryptedKey);
// final iv = encrypt.IV(decoded.sublist(0, 16)); // استخراج التهيئة
// final encrypted =
// encrypt.Encrypted(decoded.sublist(16)); // استخراج النص المشفر
// final encrypter =
// encrypt.Encrypter(encrypt.AES(_key, mode: encrypt.AESMode.cbc));
// return encrypter.decrypt(encrypted, iv: iv);
// }
// }
// class KeyEncryption {
// static final _key =
// encrypt.Key.fromUtf8('32-character-key....'); // ضع مفتاحك هنا
//
// static String encryptKey(String key) {
// final iv = encrypt.IV.fromLength(16); // توليد تهيئة عشوائية
// final encrypter =
// encrypt.Encrypter(encrypt.AES(_key, mode: encrypt.AESMode.cbc));
// final encrypted = encrypter.encrypt(key, iv: iv);
// final result = iv.bytes + encrypted.bytes; // تضمين التهيئة مع النص المشفر
// return base64Encode(result);
// }
//
// static Future<void> storeApiKeys(List<String> apiKeys) async {
// final encryptedKeys = apiKeys.map((key) => encryptKey(key)).toList();
// final response = await http.post(
// Uri.parse('https://yourdomain.com/store_keys.php'),
// body: jsonEncode({'keys': encryptedKeys}),
// headers: {'Content-Type': 'application/json'},
// );
//
// if (response.statusCode == 200) {
// print('Keys stored successfully.');
// } else {
// print('Failed to store keys.');
// }
// }
// }

View File

@@ -0,0 +1,67 @@
import 'dart:convert';
import 'dart:io';
import 'package:SEFER/constant/links.dart';
import 'package:SEFER/controller/functions/crud.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:url_launcher/url_launcher.dart';
import '../../constant/info.dart';
Future<void> checkForUpdate(BuildContext context) async {
final packageInfo = await PackageInfo.fromPlatform();
final currentVersion = packageInfo.buildNumber;
print('currentVersion is : $currentVersion');
// Fetch the latest version from your server
String latestVersion = await getPackageInfo();
if (latestVersion.isNotEmpty && latestVersion != currentVersion) {
showUpdateDialog(context);
}
}
Future<String> getPackageInfo() async {
final response = await CRUD().get(link: AppLink.packageInfo, payload: {
"platform": Platform.isAndroid ? 'android' : 'ios',
"appName": AppInformation.appName,
});
if (response != 'failure') {
return jsonDecode(response)['message'][0]['version'];
}
return '';
}
void showUpdateDialog(BuildContext context) {
final String storeUrl = Platform.isAndroid
? 'https://play.google.com/store/apps/details?id=com.sefer_driver'
: 'https://apps.apple.com/ae/app/sefer/id6458734951';
showCupertinoDialog(
context: context,
barrierDismissible: false,
builder: (BuildContext context) {
return CupertinoAlertDialog(
title: Text('Update Available'.tr),
content: Text(
'A new version of the app is available. Please update to the latest version.'
.tr,
),
actions: <Widget>[
CupertinoDialogAction(
child: Text('Update'.tr),
onPressed: () async {
if (await canLaunchUrl(Uri.parse(storeUrl))) {
await launchUrl(Uri.parse(storeUrl));
} else {
print('Could not launch $storeUrl');
}
Navigator.of(context).pop();
},
),
],
);
},
);
}

View File

@@ -4,6 +4,9 @@ class MyTranslation extends Translations {
@override @override
Map<String, Map<String, String>> get keys => { Map<String, Map<String, String>> get keys => {
"ar": { "ar": {
"Update Available": "تحديث متوفر",
"A new version of the app is available. Please update to the latest version.":
"تتوفر نسخة جديدة من التطبيق. يرجى التحديث إلى أحدث إصدار.",
"We use location to get accurate and nearest passengers for you": "We use location to get accurate and nearest passengers for you":
"نستخدم الموقع للحصول على أقرب الركاب وأكثرهم دقة لك", "نستخدم الموقع للحصول على أقرب الركاب وأكثرهم دقة لك",
"This ride is already applied by another driver.": "This ride is already applied by another driver.":

View File

@@ -56,43 +56,44 @@ class RateController extends GetxController {
if (value != 'failure') { if (value != 'failure') {
Get.snackbar('Wallet Added'.tr, '', Get.snackbar('Wallet Added'.tr, '',
backgroundColor: AppColor.greenColor); backgroundColor: AppColor.greenColor);
if (double.parse( // if (double.parse(
Get.find<CaptainWalletController>().totalAmountVisa) > // Get.find<CaptainWalletController>().totalAmountVisa) >
remainingFee) { // remainingFee) {
var paymentToken3 = await Get.find<MapDriverController>() var paymentToken3 = await Get.find<MapDriverController>()
.generateTokenDriver((-1 * remainingFee).toString()); .generateTokenDriver((-1 * remainingFee).toString());
await CRUD().post(link: AppLink.addDrivePayment, payload: { await CRUD().post(link: AppLink.addDrivePayment, payload: {
'rideId': 'remain$rideId', 'rideId': 'remain$rideId',
'amount': (-1 * remainingFee).toString(), 'amount': (-1 * remainingFee).toString(),
'payment_method': 'Remainder', 'payment_method': 'Remainder',
'passengerID': passengerId, 'passengerID': passengerId,
'token': paymentToken3, 'token': paymentToken3,
'driverID': box.read(BoxName.driverID).toString(), 'driverID': box.read(BoxName.driverID).toString(),
}); });
} else { // }
double pointsSubtraction = 0; // else {
pointsSubtraction = remainingFee * // double pointsSubtraction = 0;
(-1) / // pointsSubtraction = remainingFee *
double.parse( // (-1) /
Get.find<MapDriverController>().kazan); // for egypt /100 // double.parse(
var paymentToken4 = await Get.find<MapDriverController>() // Get.find<MapDriverController>().kazan); // for egypt /100
.generateTokenDriver((pointsSubtraction).toStringAsFixed(0)); // var paymentToken4 = await Get.find<MapDriverController>()
var res = await CRUD() // .generateTokenDriver((pointsSubtraction).toStringAsFixed(0));
.post(link: AppLink.addDriversWalletPoints, payload: { // var res = await CRUD()
'paymentID': 'rideId$rideId', // .post(link: AppLink.addDriversWalletPoints, payload: {
'amount': (pointsSubtraction).toStringAsFixed(0), // 'paymentID': 'rideId$rideId',
'paymentMethod': 'Remainder', // 'amount': (pointsSubtraction).toStringAsFixed(0),
'token': paymentToken4, // 'paymentMethod': 'Remainder',
'driverID': box.read(BoxName.driverID).toString(), // 'token': paymentToken4,
}); // 'driverID': box.read(BoxName.driverID).toString(),
FirebaseMessagesController().sendNotificationToAnyWithoutData( // });
'Wallet Added'.tr, FirebaseMessagesController().sendNotificationToAnyWithoutData(
'Wallet Added${(remainingFee).toStringAsFixed(0)}'.tr, 'Wallet Added'.tr,
Get.find<MapDriverController>().tokenPassenger, 'Wallet Added${(remainingFee).toStringAsFixed(0)}'.tr,
'tone2.wav'); Get.find<MapDriverController>().tokenPassenger,
walletChecked = 'true'; 'tone2.wav');
} walletChecked = 'true';
// }
update(); update();
} }

View File

@@ -17,6 +17,7 @@ import 'constant/info.dart';
import 'controller/firebase/firbase_messge.dart'; import 'controller/firebase/firbase_messge.dart';
import 'controller/firebase/local_notification.dart'; import 'controller/firebase/local_notification.dart';
import 'controller/functions/location_controller.dart'; import 'controller/functions/location_controller.dart';
import 'controller/functions/package_info.dart';
import 'controller/local/local_controller.dart'; import 'controller/local/local_controller.dart';
import 'controller/local/translations.dart'; import 'controller/local/translations.dart';
import 'controller/payment/paymob/paymob_wallet.dart'; import 'controller/payment/paymob/paymob_wallet.dart';
@@ -109,7 +110,7 @@ class MyApp extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
LocaleController localController = Get.put(LocaleController()); LocaleController localController = Get.put(LocaleController());
// checkForUpdate(context);
return GetMaterialApp( return GetMaterialApp(
title: AppInformation.appName, title: AppInformation.appName,
translations: MyTranslation(), translations: MyTranslation(),

View File

@@ -10,6 +10,7 @@ import '../../../../constant/info.dart';
import '../../../../constant/style.dart'; import '../../../../constant/style.dart';
import '../../../../constant/table_names.dart'; import '../../../../constant/table_names.dart';
import '../../../../controller/functions/location_controller.dart'; import '../../../../controller/functions/location_controller.dart';
import '../../../../controller/functions/package_info.dart';
import '../../../../controller/home/captin/home_captain_controller.dart'; import '../../../../controller/home/captin/home_captain_controller.dart';
import '../../../../controller/home/captin/order_request_controller.dart'; import '../../../../controller/home/captin/order_request_controller.dart';
import '../../../widgets/circle_container.dart'; import '../../../widgets/circle_container.dart';
@@ -28,6 +29,9 @@ class HomeCaptain extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
Get.put(OrderRequestController()); Get.put(OrderRequestController());
Get.put(HomeCaptainController()); Get.put(HomeCaptainController());
WidgetsBinding.instance.addPostFrameCallback((_) {
checkForUpdate(context);
});
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
// backgroundColor: AppColor.accentColor, // backgroundColor: AppColor.accentColor,

View File

@@ -22,50 +22,52 @@ GetBuilder<HomeCaptainController> leftMainMenuCaptainIcons() {
left: 6, left: 6,
child: Column( child: Column(
children: [ children: [
// AnimatedContainer( AnimatedContainer(
// duration: const Duration(microseconds: 200), duration: const Duration(microseconds: 200),
// width: controller.widthMapTypeAndTraffic, width: controller.widthMapTypeAndTraffic,
// decoration: BoxDecoration( decoration: BoxDecoration(
// border: Border.all(color: AppColor.blueColor), border: Border.all(color: AppColor.blueColor),
// color: AppColor.secondaryColor, color: AppColor.secondaryColor,
// borderRadius: BorderRadius.circular(15)), borderRadius: BorderRadius.circular(15)),
// child: IconButton( child: IconButton(
// onPressed: () { onPressed: () {
// // AC credentials = AC(); // AC credentials = AC();
// String apiKey = 'mehmetDEV@2101'; String apiKey = 'maldev@2101hamzaayedseferegyptjo';
// // String convertedStringN = credentials.c( // String convertedStringN = credentials.c(
// // credentials.c(credentials.c(apiKey, cs), cC), cn); // credentials.c(credentials.c(apiKey, cs), cC), cn);
// // print(convertedStringN); // print(convertedStringN);
// // String retrievedStringS = credentials.r( // String retrievedStringS = credentials.r(
// // credentials.r(credentials.r(convertedStringN, cn), cC), // credentials.r(credentials.r(convertedStringN, cn), cC),
// // cs); // cs);
// // print(retrievedStringS); // print(retrievedStringS);
// // // // //
// // if (retrievedStringS == apiKey) { // if (retrievedStringS == apiKey) {
// // print('same'); // print('same');
// // } // }
//
// // key.forEach((key, apiKey) { // key.forEach((key, apiKey) {
// String encryptedApiKey = KeyEncryption.encryptKey(apiKey);
// print('Encrypted = $encryptedApiKey'); // keys.forEach((key, apiKey) {
// String encryptedApiKey = KeyEncryption.encryptKey(apiKey);
// String decryptedApiKey = print('Encrypted API Key for : $encryptedApiKey');
// KeyEncryption.decryptKey(encryptedApiKey);
// print('Decrypted : $decryptedApiKey'); String decryptedApiKey = KeyEncryption.decryptKey(
// "Hsd7tLdt4ZsSRMCCs0xia2ct9O1jrJKyZu6pvh6MjL8qg6TkJ9FZCW4H/OqCkMjtokBOTdTX0P2sASLTcTxBVA==");
// // if (decryptedApiKey == apiKey) { print('Decrypted API Key for : $decryptedApiKey');
// // print('Keys match for $decryptedApiKey');
// // } else { if (decryptedApiKey == apiKey) {
// // // print('Keys do not match for $key'); print('Keys match for ');
// // } } else {
// // }); print('Keys do not match for ');
// }, }
// icon: const Icon( // });
// FontAwesome.map_signs, },
// size: 24, icon: const Icon(
// color: Colors.black, FontAwesome.map_signs,
// )), size: 24,
// ), color: Colors.black,
)),
),
const SizedBox( const SizedBox(
height: 5, height: 5,
), ),

View File

@@ -413,10 +413,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: ffi name: ffi
sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.0" version: "2.1.2"
file: file:
dependency: transitive dependency: transitive
description: description:
@@ -1377,21 +1377,21 @@ packages:
source: hosted source: hosted
version: "2.1.0" version: "2.1.0"
package_info_plus: package_info_plus:
dependency: transitive dependency: "direct main"
description: description:
name: package_info_plus name: package_info_plus
sha256: "7e76fad405b3e4016cd39d08f455a4eb5199723cf594cd1b8916d47140d93017" sha256: b93d8b4d624b4ea19b0a5a208b2d6eff06004bc3ce74c06040b120eeadd00ce0
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.2.0" version: "8.0.0"
package_info_plus_platform_interface: package_info_plus_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: package_info_plus_platform_interface name: package_info_plus_platform_interface
sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6" sha256: f49918f3433a3146047372f9d4f1f847511f2acd5cd030e1f44fe5a50036b70e
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.0.1" version: "3.0.0"
path: path:
dependency: "direct main" dependency: "direct main"
description: description:
@@ -1524,10 +1524,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: plugin_platform_interface name: plugin_platform_interface
sha256: f4f88d4a900933e7267e2b353594774fc0d07fb072b47eedcd5b54e1ea3269f8 sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.7" version: "2.1.8"
pointycastle: pointycastle:
dependency: transitive dependency: transitive
description: description:
@@ -2001,18 +2001,18 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: wakelock_plus name: wakelock_plus
sha256: f268ca2116db22e57577fb99d52515a24bdc1d570f12ac18bb762361d43b043d sha256: "14758533319a462ffb5aa3b7ddb198e59b29ac3b02da14173a1715d65d4e6e68"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.1.4" version: "1.2.5"
wakelock_plus_platform_interface: wakelock_plus_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: wakelock_plus_platform_interface name: wakelock_plus_platform_interface
sha256: "40fabed5da06caff0796dc638e1f07ee395fb18801fbff3255a2372db2d80385" sha256: "422d1cdbb448079a8a62a5a770b69baa489f8f7ca21aef47800c726d404f9d16"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.1.0" version: "1.2.1"
watcher: watcher:
dependency: transitive dependency: transitive
description: description:
@@ -2073,10 +2073,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: win32 name: win32
sha256: b0f37db61ba2f2e9b7a78a1caece0052564d1bc70668156cf3a29d676fe4e574 sha256: a79dbe579cb51ecd6d30b17e0cae4e0ea15e2c0e66f69ad4198f22a6789e94f4
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "5.1.1" version: "5.5.1"
win32_registry: win32_registry:
dependency: transitive dependency: transitive
description: description:
@@ -2110,5 +2110,5 @@ packages:
source: hosted source: hosted
version: "3.1.2" version: "3.1.2"
sdks: sdks:
dart: ">=3.3.0 <4.0.0" dart: ">=3.4.0 <4.0.0"
flutter: ">=3.19.0" flutter: ">=3.19.0"

View File

@@ -64,13 +64,14 @@ dependencies:
google_mlkit_text_recognition: ^0.13.0 google_mlkit_text_recognition: ^0.13.0
sign_in_with_apple: ^6.1.0 sign_in_with_apple: ^6.1.0
firebase_auth: ^4.19.6 firebase_auth: ^4.19.6
package_info_plus: ^8.0.0
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter
flutter_lints: ^3.0.1 flutter_lints: ^3.0.1
envied_generator: ^0.5.2 envied_generator: ^0.5.2
build_runner: ^2.4.6 build_runner:
flutter_launcher_icons: flutter_launcher_icons:
android: "launcher_icon" android: "launcher_icon"