AppPermission enum
What the app wants to use, as the user would describe it, rather than the raw OS permission that happens to back it on a given device.
The distinction matters because the backing permission moves between OS
versions. "Pick a photo" is READ_EXTERNAL_STORAGE below Android 13,
READ_MEDIA_IMAGES from Android 13, and the Photos library on iOS; asking
for storage on Android 13+ is always denied, which is the single most
common permission bug in shipped apps. PermissionResolver does that
mapping, so call sites name the capability and stay correct across OS
updates.
Anything that does not exist on the running platform resolves to
PermissionState.notApplicable instead of failing — ask for
appTrackingTransparency on Android and you get "nothing to ask for",
which isAllowed treats as go-ahead.
Adding a value here is a breaking change for consumers that switch over the enum exhaustively.
- Inheritance
- Available extensions
Values
- camera → const AppPermission
-
Camera. Android + iOS.
- microphone → const AppPermission
-
Microphone. Android + iOS.
- photos → const AppPermission
-
Read the photo library. iOS Photos; Android 13+
READ_MEDIA_IMAGES(plusREAD_MEDIA_VISUAL_USER_SELECTEDfor partial access on 14+); below Android 13, storage. - photosAddOnly → const AppPermission
-
Add photos to the library without reading it. iOS only; Android has no runtime permission for writing to shared media on 10+.
- videos → const AppPermission
-
Read videos. Android 13+
READ_MEDIA_VIDEO, below 13 storage; iOS Photos (videos live in the same library). - audio → const AppPermission
-
Read audio files. Android 13+
READ_MEDIA_AUDIO, below 13 storage; iOS Media Library (Apple Music). - mediaLibrary → const AppPermission
-
Apple Music / media library. iOS only.
- storage → const AppPermission
-
Legacy shared storage. Android 12 and below only — on 13+ it cannot be granted and resolves to
notApplicable; use photos, videos, audio or manageExternalStorage instead. iOS: not applicable (the app sandbox needs no permission). - manageExternalStorage → const AppPermission
-
"All files access". Android 11+ (below 11 falls back to storage). Opens a system settings screen instead of a dialog. Google Play requires a declaration form for it.
- accessMediaLocation → const AppPermission
-
Read location metadata embedded in media files. Android 10+.
- location → const AppPermission
-
Location while the app is in use. Android + iOS. Checks that location services are switched on, too.
- locationAlways → const AppPermission
-
Location in the background. Requests location first — both OSes require it — then upgrades. On Android 11+ the upgrade step sends the user to a settings screen.
- contacts → const AppPermission
-
Contacts. Android + iOS (iOS 18 may return
limited). - calendar → const AppPermission
-
Read and write calendar events. Android + iOS (full access on iOS 17+).
- calendarWriteOnly → const AppPermission
-
Add calendar events without reading them. iOS 17+ write-only access; Android
WRITE_CALENDAR. - reminders → const AppPermission
-
Reminders. iOS only.
- notification → const AppPermission
-
Post notifications. Android 13+ shows a dialog; below 13 it reflects whether notifications are switched on. iOS may return
provisional. - criticalAlerts → const AppPermission
-
Critical alerts that bypass the mute switch. iOS only, and needs an Apple entitlement.
- bluetooth → const AppPermission
-
Bluetooth. iOS Core Bluetooth; Android 12+
BLUETOOTH_SCANandBLUETOOTH_CONNECTtogether. Below Android 12 Bluetooth is granted at install time, so it isnotApplicable— but BLE scanning there needs location, which you must request yourself. - bluetoothAdvertise → const AppPermission
-
Make the device discoverable to other Bluetooth devices. Android 12+.
- nearbyWifiDevices → const AppPermission
-
Discover and connect to nearby devices over Wi-Fi. Android 13+.
- localNetwork → const AppPermission
-
Use local-network protocols. Android 17+ (API 37).
- phone → const AppPermission
-
Phone state and calls. Android only.
- sms → const AppPermission
-
Read and send SMS. Android only.
- sensors → const AppPermission
-
Body sensors (Android) / motion & fitness (iOS).
- sensorsAlways → const AppPermission
-
Body sensors in the background. Android 13+; requests sensors first.
- activityRecognition → const AppPermission
-
Physical activity recognition. Android 10+; iOS motion & fitness.
- speech → const AppPermission
-
Speech recognition. iOS Speech framework; Android uses the microphone.
- siri → const AppPermission
-
SiriKit. iOS only.
- appTrackingTransparency → const AppPermission
-
App Tracking Transparency (IDFA). iOS 14+ only.
- scheduleExactAlarm → const AppPermission
-
Schedule exact alarms. Android 12+; opens a settings screen.
- ignoreBatteryOptimizations → const AppPermission
-
Exempt the app from battery optimisation. Android only; opens a settings screen. Google Play restricts which apps may ask.
- systemAlertWindow → const AppPermission
-
Draw over other apps. Android only; opens a settings screen.
- requestInstallPackages → const AppPermission
-
Install other APKs. Android only; opens a settings screen.
- accessNotificationPolicy → const AppPermission
-
Change Do Not Disturb. Android only; opens a settings screen.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
-
isAllowed
→ Future<
bool> -
Available on AppPermission, provided by the AppPermissionActions extension
Whether the feature can be used right now, without asking.no setter - name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - opensSystemSettings → bool
-
Whether requesting this sends the user to a system settings screen
rather than showing a dialog. These never become "permanently denied" —
the user can always be sent back — so a rationale before the jump
matters more than for ordinary permissions.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
check(
) → Future< PermissionResult> -
Available on AppPermission, provided by the AppPermissionActions extension
The current state, without asking and without UI. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
request(
{BuildContext? context, PermissionRequestOptions? options}) → Future< PermissionResult> -
Available on AppPermission, provided by the AppPermissionActions extension
Runs the full request flow — see BaabaPermissions.request. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
values
→ const List<
AppPermission> - A constant List of the values in this enum, in order of their declaration.