Commit 7a0244d3 by TimHoogstrate Committed by GitHub

Updates documentation for Permission.photos on Android (#1195)

* updates documentation for Permission.photos on Android

* added style change

* update

* minor update
parent d6a4a367
## 4.0.1
* Updates Android documentation on how to use `permission.photo` on Android 12 (API 32) and below and Android 13 (API 33) and above.
## 4.0.0
* **BREAKING CHANGE**: Replaces `Permission.calendarReadOnly` with `Permission.calendarWriteOnly`.
......
......@@ -94,13 +94,27 @@ class Permission {
/// Depending on the platform and version, the requirements are slightly
/// different:
///
/// **Android:**
/// - When running on Android 13 (API 33) and above: Read image files from
/// external storage
/// - When running below Android 13 (API 33): Nothing
///
/// **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:
/// <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32"/>
/// <uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>
///
/// 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]
/// }
/// }
static const photos = Permission._(9);
/// Permission for adding photos to the device's photo library (iOS only).
......
......@@ -3,7 +3,7 @@ description: A common platform interface for the permission_handler plugin.
homepage: https://github.com/baseflow/flutter-permission-handler/tree/master/permission_handler_platform_interface
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
version: 4.0.0
version: 4.0.1
dependencies:
flutter:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment