photos constant

Permission const photos

Permission for accessing the device's photos.

Photos can be read and added. If you only want to read them, you can use the photos permission instead (iOS only).

Depending on the platform and version, the requirements are slightly different:

iOS:

  • When running Photos (iOS 14+ read & write access level)

Android:

  • Devices running Android 12 (API level 32) or lower: use Permissions.storage.
  • Devices running Android 13 (API level 33) and above: Should use Permissions.photos.

EXAMPLE: in Manifest:

In Flutter to check the status:

if (Platform.isAndroid) { final androidInfo = await DeviceInfoPlugin().androidInfo; if (androidInfo.version.sdkInt <= 32) { use Permissions.storage.status } else { use Permissions.photos.status } }

Implementation

static const photos = Permission._(9);