From d9305b771fa942b07548aa9e35998592e26595a8 Mon Sep 17 00:00:00 2001 From: Hamza-Ayed Date: Mon, 1 Jul 2024 12:51:26 +0300 Subject: [PATCH] 7/1/2 --- android/app/build.gradle | 4 ++-- ios/Runner/Info.plist | 4 ++-- lib/controller/functions/gemeni.dart | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index c43e87e..88003cc 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -55,8 +55,8 @@ android { // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. minSdkVersion 23 targetSdkVersion 33 - versionCode 44 - versionName '1.5.44' + versionCode 45 + versionName '1.5.45' // manifestPlaceholders = [mapsApiKey: 'android/app/src/main/AndroidManifest.xml'] } diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index 89286d3..f5301e9 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -21,7 +21,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 41 + 43 CFBundleSignature ???? CFBundleURLTypes @@ -36,7 +36,7 @@ CFBundleVersion - 4.0.41 + 4.0.43 FirebaseAppDelegateProxyEnabled NO GMSApiKey diff --git a/lib/controller/functions/gemeni.dart b/lib/controller/functions/gemeni.dart index 247201c..63d19a9 100644 --- a/lib/controller/functions/gemeni.dart +++ b/lib/controller/functions/gemeni.dart @@ -40,14 +40,14 @@ class AI extends GetxController { // Get the inspection date from the response final inspectionDate = responseIdCardDriverEgyptBack['inspection_date']; - + final year = int.parse(inspectionDate.split('-')[0]); // Try parsing the tax expiry date. If it fails, set it to null. final taxExpiryDateTime = DateTime.tryParse(taxExpiryDate ?? ''); final isExpiredCar = taxExpiryDateTime != null && taxExpiryDateTime.isBefore(today); // Check if the inspection date is before today - final inspectionDateTime = DateTime(int.parse(inspectionDate ?? ''), 1, 1); + final inspectionDateTime = DateTime(year, 1, 1); final isInspectionExpired = inspectionDateTime.isBefore(today); if (isExpiredCar || isInspectionExpired) {