diff --git a/android/app/build.gradle b/android/app/build.gradle
index d004e92ab..9f65346b1 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -33,7 +33,7 @@ android {
exclude 'META-INF/services/javax.annotation.processing.Processor'
}
- compileSdkVersion 34
+ compileSdkVersion 35
namespace "com.example.talawa"
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
@@ -44,7 +44,7 @@ android {
applicationId "com.example.talawa"
minSdkVersion 21
- targetSdkVersion 34
+ targetSdkVersion 35
multiDexEnabled true
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
@@ -53,6 +53,8 @@ android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
+ // Flag to enable support for the new language APIs
+ coreLibraryDesugaringEnabled true
}
kotlinOptions {
@@ -74,5 +76,7 @@ flutter {
dependencies {
implementation 'com.android.support:multidex:1.0.3'
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.10"
+ implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.22"
+ coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.4'
+
}
diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties
index cfe88f690..2aaed3a1f 100644
--- a/android/gradle/wrapper/gradle-wrapper.properties
+++ b/android/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip
diff --git a/android/settings.gradle b/android/settings.gradle
index 61f635fea..9d07da3f4 100644
--- a/android/settings.gradle
+++ b/android/settings.gradle
@@ -19,8 +19,8 @@ pluginManagement {
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.2"
- id "com.android.application" version "7.3.0" apply false
- id "org.jetbrains.kotlin.android" version "1.8.10" apply false
+ id "com.android.application" version '8.7.1' apply false
+ id "org.jetbrains.kotlin.android" version "1.8.22" apply false
id("com.google.gms.google-services") version "4.4.1" apply false
}
diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist
index 8d4492f97..7c5696400 100644
--- a/ios/Flutter/AppFrameworkInfo.plist
+++ b/ios/Flutter/AppFrameworkInfo.plist
@@ -21,6 +21,6 @@
CFBundleVersion
1.0
MinimumOSVersion
- 9.0
+ 12.0
diff --git a/ios/Podfile.lock b/ios/Podfile.lock
index 8d5953fa6..2fc0bae36 100644
--- a/ios/Podfile.lock
+++ b/ios/Podfile.lock
@@ -1,115 +1,174 @@
PODS:
+ - Braintree/ApplePay (5.6.3):
+ - Braintree/Core
+ - Braintree/Card (5.6.3):
+ - Braintree/Core
+ - Braintree/Core (5.6.3)
+ - Braintree/PaymentFlow (5.6.3):
+ - Braintree/Core
+ - Braintree/PayPalDataCollector
+ - Braintree/PayPal (5.6.3):
+ - Braintree/Core
+ - Braintree/PayPalDataCollector
+ - Braintree/PayPalDataCollector (5.6.3)
+ - Braintree/ThreeDSecure (5.6.3):
+ - Braintree/Card
+ - Braintree/PaymentFlow
+ - Braintree/UnionPay (5.6.3):
+ - Braintree/Card
+ - Braintree/Venmo (5.6.3):
+ - Braintree/Core
+ - BraintreeDropIn (9.4.0):
+ - Braintree/ApplePay (~> 5.6.1)
+ - Braintree/Card (~> 5.6.1)
+ - Braintree/Core (~> 5.6.1)
+ - Braintree/PayPal (~> 5.6.1)
+ - Braintree/ThreeDSecure (~> 5.6.1)
+ - Braintree/UnionPay (~> 5.6.1)
+ - Braintree/Venmo (~> 5.6.1)
- connectivity_plus (0.0.1):
- Flutter
- - Reachability
+ - FlutterMacOS
+ - device_info_plus (0.0.1):
+ - Flutter
- Flutter (1.0.0)
- - FMDB (2.7.5):
- - FMDB/standard (= 2.7.5)
- - FMDB/standard (2.7.5)
+ - flutter_braintree (1.0.0):
+ - Braintree/ApplePay (~> 5.6.3)
+ - Braintree/PayPal (~> 5.6.3)
+ - BraintreeDropIn (= 9.4.0)
+ - Flutter
+ - flutter_local_notifications (0.0.1):
+ - Flutter
+ - flutter_secure_storage (6.0.0):
+ - Flutter
- image_cropper (0.0.4):
- Flutter
- - TOCropViewController (~> 2.6.1)
- - image_picker (0.0.1):
+ - TOCropViewController (~> 2.7.4)
+ - image_picker_ios (0.0.1):
- Flutter
- MTBBarcodeScanner (5.0.11)
- - path_provider_ios (0.0.1):
+ - path_provider_foundation (0.0.1):
- Flutter
- - "permission_handler (5.1.0+2)":
+ - FlutterMacOS
+ - permission_handler_apple (9.3.0):
- Flutter
- qr_code_scanner (0.2.0):
- Flutter
- MTBBarcodeScanner
- - quick_actions (0.0.1):
+ - quick_actions_ios (0.0.1):
- Flutter
- - Reachability (3.2)
- - shared_preferences (0.0.1):
+ - shared_preferences_foundation (0.0.1):
- Flutter
+ - FlutterMacOS
- social_share (0.0.1):
- Flutter
- - sqflite (0.0.2):
+ - sqflite (0.0.3):
- Flutter
- - FMDB (>= 2.7.5)
- - TOCropViewController (2.6.1)
+ - FlutterMacOS
+ - TOCropViewController (2.7.4)
- uni_links (0.0.1):
- Flutter
- - vibration (1.7.4-nullsafety.0):
+ - url_launcher_ios (0.0.1):
+ - Flutter
+ - vibration (1.7.5):
- Flutter
- - video_player (0.0.1):
+ - video_player_avfoundation (0.0.1):
- Flutter
+ - FlutterMacOS
DEPENDENCIES:
- - connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
+ - connectivity_plus (from `.symlinks/plugins/connectivity_plus/darwin`)
+ - device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
- Flutter (from `Flutter`)
+ - flutter_braintree (from `.symlinks/plugins/flutter_braintree/ios`)
+ - flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`)
+ - flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`)
- image_cropper (from `.symlinks/plugins/image_cropper/ios`)
- - image_picker (from `.symlinks/plugins/image_picker/ios`)
- - path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`)
- - permission_handler (from `.symlinks/plugins/permission_handler/ios`)
+ - image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
+ - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
+ - permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
- qr_code_scanner (from `.symlinks/plugins/qr_code_scanner/ios`)
- - quick_actions (from `.symlinks/plugins/quick_actions/ios`)
- - shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
+ - quick_actions_ios (from `.symlinks/plugins/quick_actions_ios/ios`)
+ - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
- social_share (from `.symlinks/plugins/social_share/ios`)
- - sqflite (from `.symlinks/plugins/sqflite/ios`)
+ - sqflite (from `.symlinks/plugins/sqflite/darwin`)
- uni_links (from `.symlinks/plugins/uni_links/ios`)
+ - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
- vibration (from `.symlinks/plugins/vibration/ios`)
- - video_player (from `.symlinks/plugins/video_player/ios`)
+ - video_player_avfoundation (from `.symlinks/plugins/video_player_avfoundation/darwin`)
SPEC REPOS:
trunk:
- - FMDB
+ - Braintree
+ - BraintreeDropIn
- MTBBarcodeScanner
- - Reachability
- TOCropViewController
EXTERNAL SOURCES:
connectivity_plus:
- :path: ".symlinks/plugins/connectivity_plus/ios"
+ :path: ".symlinks/plugins/connectivity_plus/darwin"
+ device_info_plus:
+ :path: ".symlinks/plugins/device_info_plus/ios"
Flutter:
:path: Flutter
+ flutter_braintree:
+ :path: ".symlinks/plugins/flutter_braintree/ios"
+ flutter_local_notifications:
+ :path: ".symlinks/plugins/flutter_local_notifications/ios"
+ flutter_secure_storage:
+ :path: ".symlinks/plugins/flutter_secure_storage/ios"
image_cropper:
:path: ".symlinks/plugins/image_cropper/ios"
- image_picker:
- :path: ".symlinks/plugins/image_picker/ios"
- path_provider_ios:
- :path: ".symlinks/plugins/path_provider_ios/ios"
- permission_handler:
- :path: ".symlinks/plugins/permission_handler/ios"
+ image_picker_ios:
+ :path: ".symlinks/plugins/image_picker_ios/ios"
+ path_provider_foundation:
+ :path: ".symlinks/plugins/path_provider_foundation/darwin"
+ permission_handler_apple:
+ :path: ".symlinks/plugins/permission_handler_apple/ios"
qr_code_scanner:
:path: ".symlinks/plugins/qr_code_scanner/ios"
- quick_actions:
- :path: ".symlinks/plugins/quick_actions/ios"
- shared_preferences:
- :path: ".symlinks/plugins/shared_preferences/ios"
+ quick_actions_ios:
+ :path: ".symlinks/plugins/quick_actions_ios/ios"
+ shared_preferences_foundation:
+ :path: ".symlinks/plugins/shared_preferences_foundation/darwin"
social_share:
:path: ".symlinks/plugins/social_share/ios"
sqflite:
- :path: ".symlinks/plugins/sqflite/ios"
+ :path: ".symlinks/plugins/sqflite/darwin"
uni_links:
:path: ".symlinks/plugins/uni_links/ios"
+ url_launcher_ios:
+ :path: ".symlinks/plugins/url_launcher_ios/ios"
vibration:
:path: ".symlinks/plugins/vibration/ios"
- video_player:
- :path: ".symlinks/plugins/video_player/ios"
+ video_player_avfoundation:
+ :path: ".symlinks/plugins/video_player_avfoundation/darwin"
SPEC CHECKSUMS:
- connectivity_plus: 5f0eb61093bec56935f21a1699dd2758bc895587
- Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
- FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
- image_cropper: 60c2789d1f1a78c873235d4319ca0c34a69f2d98
- image_picker: e06f7a68f000bd36f552c1847e33cda96ed31f1f
+ Braintree: cef7388a3647515f1e0861e52200c2f3dad0f98f
+ BraintreeDropIn: 89df35f840004affa22ebb8f06b12d20615411bf
+ connectivity_plus: 18382e7311ba19efcaee94442b23b32507b20695
+ device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6
+ Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
+ flutter_braintree: 72276002464c36b1d5a6266fbdb94c0b600e62fd
+ flutter_local_notifications: df98d66e515e1ca797af436137b4459b160ad8c9
+ flutter_secure_storage: d33dac7ae2ea08509be337e775f6b59f1ff45f12
+ image_cropper: 37d40f62177c101ff4c164906d259ea2c3aa70cf
+ image_picker_ios: 99dfe1854b4fa34d0364e74a78448a0151025425
MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb
- path_provider_ios: 7d7ce634493af4477d156294792024ec3485acd5
- permission_handler: ccb20a9fad0ee9b1314a52b70b76b473c5f8dab0
+ path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c
+ permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
qr_code_scanner: bb67d64904c3b9658ada8c402e8b4d406d5d796e
- quick_actions: 6cb2390c4dab0e737c94573c27e18d9666710720
- Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
- shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d
+ quick_actions_ios: d24571db7345d2e48d094db8d077a015a568002d
+ shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
social_share: 702a5e3842addd22db515aa9e1e00a4b80a0296d
- sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
- TOCropViewController: edfd4f25713d56905ad1e0b9f5be3fbe0f59c863
+ sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec
+ TOCropViewController: 80b8985ad794298fb69d3341de183f33d1853654
uni_links: d97da20c7701486ba192624d99bffaaffcfc298a
- vibration: 1ec279c4a1a7a646627b54039d812334b3f1114a
- video_player: ecd305f42e9044793efd34846e1ce64c31ea6fcb
+ url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
+ vibration: 7d883d141656a1c1a6d8d238616b2042a51a1241
+ video_player_avfoundation: 02011213dab73ae3687df27ce441fbbcc82b5579
-PODFILE CHECKSUM: fe0e1ee7f3d1f7d00b11b474b62dd62134535aea
+PODFILE CHECKSUM: 4e8f8b2be68aeea4c0d5beb6ff1e79fface1d048
-COCOAPODS: 1.11.2
+COCOAPODS: 1.16.2
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
index 39eccc98c..4127bd7e3 100644
--- a/ios/Runner.xcodeproj/project.pbxproj
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -3,13 +3,12 @@
archiveVersion = 1;
classes = {
};
- objectVersion = 50;
+ objectVersion = 54;
objects = {
/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
- 6915D38338D0ADAB147B5DB7 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 11EBC6466495142DFCF23943 /* Pods_Runner.framework */; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
@@ -31,15 +30,12 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
- 11EBC6466495142DFCF23943 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
- 1EAE81F3FE5F67128E58B85C /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
69935DC81F37E501ACAA4312 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
- 786A3858C1D311840AA1B4F9 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
93F84FD8134080F559F7DA61 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
@@ -144,6 +140,7 @@
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
F5E55538C6E5FA6AF4D9E28D /* [CP] Embed Pods Frameworks */,
+ 84680CE8D6DA2CB4549DD155 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
@@ -160,7 +157,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 1300;
+ LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
@@ -202,34 +199,14 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
- 13FF27AB0F3886FAC5A400E8 /* [CP] Check Pods Manifest.lock */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputFileListPaths = (
- );
- inputPaths = (
- "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
- "${PODS_ROOT}/Manifest.lock",
- );
- name = "[CP] Check Pods Manifest.lock";
- outputFileListPaths = (
- );
- outputPaths = (
- "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
- showEnvVarsInLog = 0;
- };
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
+ "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
);
name = "Thin Binary";
outputPaths = (
@@ -260,8 +237,26 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
+ 84680CE8D6DA2CB4549DD155 /* [CP] Copy Pods Resources */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputFileListPaths = (
+ "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
+ );
+ name = "[CP] Copy Pods Resources";
+ outputFileListPaths = (
+ "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
+ showEnvVarsInLog = 0;
+ };
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
@@ -366,7 +361,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@@ -384,7 +379,10 @@
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
PRODUCT_BUNDLE_IDENTIFIER = com.example.talawa;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@@ -440,7 +438,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@@ -489,7 +487,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@@ -508,7 +506,10 @@
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
PRODUCT_BUNDLE_IDENTIFIER = com.example.talawa;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@@ -527,7 +528,10 @@
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
PRODUCT_BUNDLE_IDENTIFIER = com.example.talawa;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
index 3db53b6e1..e67b2808a 100644
--- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
+++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -1,6 +1,6 @@
NSPhotoLibraryUsageDescription
Allow access to photo library
+ CADisableMinimumFrameDurationOnPhone
+
+ UIApplicationSupportsIndirectInputEvents
+
-
\ No newline at end of file
+
diff --git a/lib/services/image_service.dart b/lib/services/image_service.dart
index b8a2a1a90..380d61071 100644
--- a/lib/services/image_service.dart
+++ b/lib/services/image_service.dart
@@ -29,10 +29,6 @@ class ImageService {
try {
final CroppedFile? croppedImage = await _imageCropper.cropImage(
sourcePath: imageFile.path,
- aspectRatioPresets: [
- CropAspectRatioPreset.square,
- CropAspectRatioPreset.original,
- ],
uiSettings: [
AndroidUiSettings(
toolbarTitle: 'Crop Image',
@@ -42,9 +38,23 @@ class ImageService {
cropGridColor: Colors.white,
initAspectRatio: CropAspectRatioPreset.original,
lockAspectRatio: false,
+ aspectRatioPresets: [
+ CropAspectRatioPreset.square,
+ CropAspectRatioPreset.original,
+ CropAspectRatioPreset.ratio3x2,
+ CropAspectRatioPreset.ratio4x3,
+ CropAspectRatioPreset.ratio16x9,
+ ],
),
IOSUiSettings(
minimumAspectRatio: 1.0,
+ aspectRatioPresets: [
+ CropAspectRatioPreset.square,
+ CropAspectRatioPreset.original,
+ CropAspectRatioPreset.ratio3x2,
+ CropAspectRatioPreset.ratio4x3,
+ CropAspectRatioPreset.ratio16x9,
+ ],
),
],
);
diff --git a/pubspec.lock b/pubspec.lock
index 81be681f3..538a7c5e3 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -357,10 +357,10 @@ packages:
dependency: transitive
description:
name: ffi
- sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878"
+ sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6"
url: "https://pub.dev"
source: hosted
- version: "2.1.0"
+ version: "2.1.3"
file:
dependency: "direct main"
description:
@@ -753,26 +753,26 @@ packages:
dependency: "direct main"
description:
name: image_cropper
- sha256: f4bad5ed2dfff5a7ce0dfbad545b46a945c702bb6182a921488ef01ba7693111
+ sha256: "266760ed426d7121f0ada02c672bfe5c1b5c714e908328716aee756f045709dc"
url: "https://pub.dev"
source: hosted
- version: "5.0.1"
+ version: "8.1.0"
image_cropper_for_web:
dependency: transitive
description:
name: image_cropper_for_web
- sha256: "865d798b5c9d826f1185b32e5d0018c4183ddb77b7b82a931e1a06aa3b74974e"
+ sha256: "34256c8fb7fcb233251787c876bb37271744459b593a948a2db73caa323034d0"
url: "https://pub.dev"
source: hosted
- version: "3.0.0"
+ version: "6.0.2"
image_cropper_platform_interface:
dependency: transitive
description:
name: image_cropper_platform_interface
- sha256: ee160d686422272aa306125f3b6fb1c1894d9b87a5e20ed33fa008e7285da11e
+ sha256: e8e9d2ca36360387aee39295ce49029362ae4df3071f23e8e71f2b81e40b7531
url: "https://pub.dev"
source: hosted
- version: "5.0.0"
+ version: "7.0.0"
image_picker:
dependency: "direct main"
description:
@@ -1573,10 +1573,10 @@ packages:
dependency: transitive
description:
name: url_launcher_ios
- sha256: "75bb6fe3f60070407704282a2d295630cab232991eb52542b18347a8a941df03"
+ sha256: "16a513b6c12bb419304e72ea0ae2ab4fed569920d1c7cb850263fe3acc824626"
url: "https://pub.dev"
source: hosted
- version: "6.2.4"
+ version: "6.3.2"
url_launcher_linux:
dependency: transitive
description:
@@ -1685,10 +1685,10 @@ packages:
dependency: transitive
description:
name: video_player_android
- sha256: "7f8f25d7ad56819a82b2948357f3c3af071f6a678db33833b26ec36bbc221316"
+ sha256: e343701aa890b74a863fa460f5c0e628127ed06a975d7d9af6b697133fb25bdf
url: "https://pub.dev"
source: hosted
- version: "2.4.11"
+ version: "2.7.1"
video_player_avfoundation:
dependency: transitive
description:
@@ -1757,10 +1757,10 @@ packages:
dependency: transitive
description:
name: win32
- sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8"
+ sha256: "68d1e89a91ed61ad9c370f9f8b6effed9ae5e0ede22a270bdfa6daf79fc2290a"
url: "https://pub.dev"
source: hosted
- version: "5.2.0"
+ version: "5.5.4"
win32_registry:
dependency: transitive
description:
diff --git a/pubspec.yaml b/pubspec.yaml
index b710b071b..92a29c0ce 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -51,7 +51,7 @@ dependencies:
graphql_flutter: ^5.1.2
hive: ^2.2.3
http: ^1.2.2
- image_cropper: ^5.0.1
+ image_cropper: ^8.0.2
image_picker: ^1.1.2
intl: ^0.19.0
json_annotation: ^4.7.0
diff --git a/test/helpers/test_helpers.mocks.dart b/test/helpers/test_helpers.mocks.dart
index 417efbb51..b1632b02e 100644
--- a/test/helpers/test_helpers.mocks.dart
+++ b/test/helpers/test_helpers.mocks.dart
@@ -4525,14 +4525,6 @@ class MockImageCropper extends _i2.Mock implements _i41.ImageCropper {
int? maxWidth,
int? maxHeight,
_i42.CropAspectRatio? aspectRatio,
- List<_i42.CropAspectRatioPreset>? aspectRatioPresets = const [
- _i42.CropAspectRatioPreset.original,
- _i42.CropAspectRatioPreset.square,
- _i42.CropAspectRatioPreset.ratio3x2,
- _i42.CropAspectRatioPreset.ratio4x3,
- _i42.CropAspectRatioPreset.ratio16x9,
- ],
- _i42.CropStyle? cropStyle = _i42.CropStyle.rectangle,
_i42.ImageCompressFormat? compressFormat = _i42.ImageCompressFormat.jpg,
int? compressQuality = 90,
List<_i42.PlatformUiSettings>? uiSettings,
@@ -4546,8 +4538,6 @@ class MockImageCropper extends _i2.Mock implements _i41.ImageCropper {
#maxWidth: maxWidth,
#maxHeight: maxHeight,
#aspectRatio: aspectRatio,
- #aspectRatioPresets: aspectRatioPresets,
- #cropStyle: cropStyle,
#compressFormat: compressFormat,
#compressQuality: compressQuality,
#uiSettings: uiSettings,
diff --git a/test/service_tests/image_service_test.dart b/test/service_tests/image_service_test.dart
index 399fbda7b..fb74c78e7 100644
--- a/test/service_tests/image_service_test.dart
+++ b/test/service_tests/image_service_test.dart
@@ -22,22 +22,20 @@ class MockImageService extends Mock implements ImageService {
}
void main() {
+ late ImageCropper mockImageCropper;
+
setUpAll(() {
TestWidgetsFlutterBinding.ensureInitialized();
testSetupLocator();
registerServices();
});
+ setUp(() {
+ mockImageCropper = locator();
+ reset(mockImageCropper); // Reset mock before each test
+ });
group('Tests for Crop Image', () {
- test("test no image provided for the image cropper", () async {
- const path = 'test';
- final file = await imageService.cropImage(imageFile: File(path));
- expect(file?.path, null);
- });
-
test("crop image method", () async {
- final mockImageCropper = imageCropper;
-
const path = "test";
final fakefile = File(path);
final croppedFile = CroppedFile("fakeCropped");
@@ -45,10 +43,6 @@ void main() {
when(
mockImageCropper.cropImage(
sourcePath: "test",
- aspectRatioPresets: [
- CropAspectRatioPreset.square,
- CropAspectRatioPreset.original,
- ],
uiSettings: anyNamed('uiSettings'),
),
).thenAnswer((realInvocation) async => croppedFile);
@@ -58,17 +52,95 @@ void main() {
expect(file?.path, croppedFile.path);
});
+ test('cropImage handles null CroppedFile', () async {
+ final testFile = File('test.png');
+
+ when(
+ mockImageCropper.cropImage(
+ sourcePath: 'test',
+ uiSettings: anyNamed('uiSettings'),
+ ),
+ ).thenAnswer((_) async => null);
+
+ final result = await imageService.cropImage(imageFile: testFile);
+
+ expect(result, isNull);
+ });
+
+ test('cropImage uses correct aspectRatioPresets', () async {
+ const path = "test";
+
+ final testFile = File(path);
+ final croppedFile = CroppedFile('cropped_test.png');
+
+ when(
+ mockImageCropper.cropImage(
+ sourcePath: 'test',
+ uiSettings: captureAnyNamed('uiSettings'),
+ ),
+ ).thenAnswer((_) async => croppedFile);
+
+ await imageService.cropImage(imageFile: testFile);
+
+ final capturedUiSettings = verify(
+ mockImageCropper.cropImage(
+ sourcePath: 'test',
+ uiSettings: captureAnyNamed('uiSettings'),
+ ),
+ ).captured.single as List;
+
+ final androidSettings =
+ capturedUiSettings.whereType().single;
+ final iosSettings = capturedUiSettings.whereType().single;
+
+ expect(
+ androidSettings.aspectRatioPresets,
+ contains(CropAspectRatioPreset.square),
+ );
+ expect(
+ androidSettings.aspectRatioPresets,
+ contains(CropAspectRatioPreset.original),
+ );
+ expect(
+ androidSettings.aspectRatioPresets,
+ contains(CropAspectRatioPreset.ratio3x2),
+ );
+ expect(
+ androidSettings.aspectRatioPresets,
+ contains(CropAspectRatioPreset.ratio4x3),
+ );
+ expect(
+ androidSettings.aspectRatioPresets,
+ contains(CropAspectRatioPreset.ratio16x9),
+ );
+ expect(
+ iosSettings.aspectRatioPresets,
+ contains(CropAspectRatioPreset.square),
+ );
+ expect(
+ iosSettings.aspectRatioPresets,
+ contains(CropAspectRatioPreset.original),
+ );
+ expect(
+ iosSettings.aspectRatioPresets,
+ contains(CropAspectRatioPreset.ratio3x2),
+ );
+ expect(
+ iosSettings.aspectRatioPresets,
+ contains(CropAspectRatioPreset.ratio4x3),
+ );
+ expect(
+ iosSettings.aspectRatioPresets,
+ contains(CropAspectRatioPreset.ratio16x9),
+ );
+ });
+
test("error in crop image", () async {
- final mockImageCropper = locator();
const path = "test";
final fakefile = File(path);
when(
mockImageCropper.cropImage(
sourcePath: "test",
- aspectRatioPresets: [
- CropAspectRatioPreset.square,
- CropAspectRatioPreset.original,
- ],
uiSettings: anyNamed('uiSettings'),
),
).thenThrow(Exception());
diff --git a/test/service_tests/multi_media_pick_service_test.dart b/test/service_tests/multi_media_pick_service_test.dart
index 10e93b76e..956c72b03 100644
--- a/test/service_tests/multi_media_pick_service_test.dart
+++ b/test/service_tests/multi_media_pick_service_test.dart
@@ -17,21 +17,21 @@ import '../helpers/test_helpers.dart';
import '../helpers/test_locator.dart';
void main() {
+ late ImageCropper mockImageCropper;
+
setUpAll(() {
TestWidgetsFlutterBinding.ensureInitialized();
testSetupLocator();
+ registerServices();
});
setUp(() {
- registerServices();
+ mockImageCropper = locator();
+ reset(mockImageCropper); // Reset mock before each test
SizeConfig().test();
});
- tearDown(() {
- unregisterServices();
- });
group('MultiMediaPickerService test', () {
test("test get photo from gallery method if camera option is false",
() async {
- final mockImageCropper = locator();
final mockPicker = imagePicker;
final model = MultiMediaPickerService();
const path = 'test';
@@ -41,10 +41,6 @@ void main() {
when(
mockImageCropper.cropImage(
sourcePath: "test",
- aspectRatioPresets: [
- CropAspectRatioPreset.square,
- CropAspectRatioPreset.original,
- ],
uiSettings: anyNamed('uiSettings'),
),
).thenAnswer((realInvocation) async => CroppedFile(path));
@@ -55,7 +51,6 @@ void main() {
});
test("test get photo from gallery method if camera option is true",
() async {
- final mockImageCropper = locator();
final mockPicker = locator();
final model = MultiMediaPickerService();
const path = 'test';
@@ -65,10 +60,6 @@ void main() {
when(
mockImageCropper.cropImage(
sourcePath: "test",
- aspectRatioPresets: [
- CropAspectRatioPreset.square,
- CropAspectRatioPreset.original,
- ],
uiSettings: anyNamed('uiSettings'),
),
).thenAnswer((realInvocation) async => CroppedFile(path));
@@ -77,6 +68,53 @@ void main() {
expect(result?.path, path);
});
+ test(
+ "test get photo from gallery method with aspectRatioPresets in uiSettings",
+ () async {
+ final mockPicker = locator();
+ final model = MultiMediaPickerService();
+ const path = 'test';
+ final image = XFile(path);
+
+ when(mockPicker.pickImage(source: ImageSource.gallery))
+ .thenAnswer((_) async => image);
+ when(
+ mockImageCropper.cropImage(
+ sourcePath: "test",
+ uiSettings: anyNamed('uiSettings'),
+ ),
+ ).thenAnswer((_) async => CroppedFile(path));
+
+ await model.getPhotoFromGallery(camera: false);
+
+ final capturedUiSettings = verify(
+ mockImageCropper.cropImage(
+ sourcePath: "test",
+ uiSettings: captureAnyNamed('uiSettings'),
+ ),
+ ).captured.single as List;
+
+ final androidSettings =
+ capturedUiSettings.whereType().single;
+ final iosSettings = capturedUiSettings.whereType().single;
+
+ expect(
+ androidSettings.aspectRatioPresets,
+ contains(CropAspectRatioPreset.square),
+ );
+ expect(
+ androidSettings.aspectRatioPresets,
+ contains(CropAspectRatioPreset.original),
+ );
+ expect(
+ iosSettings.aspectRatioPresets,
+ contains(CropAspectRatioPreset.square),
+ );
+ expect(
+ iosSettings.aspectRatioPresets,
+ contains(CropAspectRatioPreset.original),
+ );
+ });
test("test no photo provided for the pick image", () async {
final model = MultiMediaPickerService();
final file = await model.getPhotoFromGallery(camera: false);