Image Functionality & Discounts & Offers

pull/319/head
Aamir Muhammad 1 month ago
parent c77ee66c3a
commit 1ff91bb159

@ -177,14 +177,17 @@ class PermissionService {
// For Android 13+ (API 33+), the Android Photo Picker handles permissions internally
// No need to request READ_MEDIA_IMAGES or READ_EXTERNAL_STORAGE permissions
if (Platform.isAndroid) {
// Determine which permission to check based on platform and Android version
Permission galleryPermission;
if (Platform.isIOS) {
galleryPermission = Permission.photos;
} else {
// Android: use photos permission which handles API level differences automatically
print('✅ Android Photo Picker will handle permissions internally');
return true;
}
// iOS: Check photos permission
Permission galleryPermission = Permission.photos;
// First check current status
PermissionStatus currentStatus = await galleryPermission.status;
print('Current gallery permission status: $currentStatus');
@ -219,6 +222,7 @@ class PermissionService {
Navigator.pop(context);
},
onConfirmTap: () async {
Navigator.pop(context);
openAppSettings();
},
),

Loading…
Cancel
Save