Permission class Null safety

Defines the permissions which can be checked and requested.

Implementers
Annotations

Constructors

Permission.byValue(int value)
Creates a Permission using the supplied integer value.
factory

Properties

hashCode int
The hash code for this object.
read-only, override
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
value int
Integer representation of the Permission.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override

Constants

accessMediaLocation → const Permission
Android: Allows an application to access any geographic locations persisted in the user's shared collection.
Permission._(18)
accessNotificationPolicy → const Permission
Android: Allows the user to access the notification policy of the phone. EX: Allows app to turn on and off do-not-disturb. iOS: Nothing
Permission._(27)
activityRecognition → const Permission
When running on Android Q and above: Activity Recognition When running on Android < Q: Nothing iOS: Nothing
Permission._(19)
appTrackingTransparency → const Permission
Android: Nothing iOS: Allows user to accept that your app collects data about end users and shares it with other companies for purposes of tracking across apps and websites.
Permission._(25)
bluetooth → const Permission
iOS 13 and above: The authorization state of Core Bluetooth manager. When running < iOS 13 or Android this is always allowed.
Permission._(21)
bluetoothAdvertise → const Permission
Android: Allows the user to make this device discoverable to other Bluetooth devices. iOS: Nothing
Permission._(29)
bluetoothConnect → const Permission
Android: Allows the user to connect with already paired Bluetooth devices. iOS: Nothing
Permission._(30)
bluetoothScan → const Permission
Android: Allows the user to look for Bluetooth devices (e.g. BLE peripherals). iOS: Nothing
Permission._(28)
calendar → const Permission
Android: Calendar iOS: Calendar (Events)
Permission._(0)
camera → const Permission
Android: Camera iOS: Photos (Camera Roll and Camera)
Permission._(1)
contacts → const Permission
Android: Contacts iOS: AddressBook
Permission._(2)
criticalAlerts → const Permission
Android: Nothing iOS: Notifications that override your ringer
Permission._(26)
ignoreBatteryOptimizations → const Permission
Android: Ignore Battery Optimizations
Permission._(16)
location → const PermissionWithService
Android: Fine and Coarse Location iOS: CoreLocation (Always and WhenInUse)
PermissionWithService._(3)
locationAlways → const PermissionWithService
Android: When running on Android < Q: Fine and Coarse Location When running on Android Q and above: Background Location Permission iOS: CoreLocation - Always When requesting this permission the user needs to grant permission for the locationWhenInUse permission first, clicking on the Àllow While Using App option on the popup. After allowing the permission the user can request the locationAlways permission and can click on the Change To Always Allow option.
PermissionWithService._(4)
locationWhenInUse → const PermissionWithService
Android: Fine and Coarse Location iOS: CoreLocation - WhenInUse
PermissionWithService._(5)
manageExternalStorage → const Permission
Android: Allows an application a broad access to external storage in scoped storage. iOS: Nothing
Permission._(22)
mediaLibrary → const Permission
Android: None iOS: MPMediaLibrary
Permission._(6)
microphone → const Permission
Android: Microphone iOS: Microphone
Permission._(7)
notification → const Permission
Android: Notification iOS: Notification
Permission._(17)
phone → const PermissionWithService
Android: Phone iOS: Nothing
PermissionWithService._(8)
photos → const Permission
Android: Nothing iOS: Photos iOS 14+ read & write access level
Permission._(9)
photosAddOnly → const Permission
Android: Nothing iOS: Photos iOS 14+ read & write access level
Permission._(10)
reminders → const Permission
Android: Nothing iOS: Reminders
Permission._(11)
requestInstallPackages → const Permission
Android: Allows an app to request installing packages. iOS: Nothing
Permission._(24)
sensors → const Permission
Android: Body Sensors iOS: CoreMotion
Permission._(12)
sms → const Permission
Android: Sms iOS: Nothing
Permission._(13)
speech → const Permission
Android: Microphone iOS: Speech
Permission._(14)
storage → const Permission
Android: External Storage iOS: Access to folders like Documents or Downloads. Implicitly granted.
Permission._(15)
systemAlertWindow → const Permission
Android: Allows an app to create windows shown on top of all other apps iOS: Nothing
Permission._(23)
unknown → const Permission
The unknown only used for return type, never requested
Permission._(20)
values → const List<Permission>
Returns a list of all possible PermissionGroup values.
<Permission>[calendar, camera, contacts, location, locationAlways, locationWhenInUse, mediaLibrary, microphone, phone, photos, photosAddOnly, reminders, sensors, sms, speech, storage, ignoreBatt…