AppPermissionHandler class

Constructors

AppPermissionHandler()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

ensureGranted(Iterable<Permission> permissions) → Future<bool>
Whether all of permissions are granted, asking the OS for any that are not. Answers the verification page's own requests once the flow is under way. Never throws: a request that fails counts as not granted.
isLocationServiceEnabled() → Future<bool>
Whether the device's own location setting is on.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openLocationSettings() → Future<bool>
Opens the settings screen that holds the device's location switch, as directly as the platform allows. Returns whether a screen opened.
openSettings() → Future<bool>
Opens this app's page in the system settings app. Returns whether the screen actually opened.
requestPermissions() → Future<PermissionOutcome>
Asks for everything the flow needs and reports where that leaves it.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

launchAndroidIntent ↔ Future<void> Function(String action)
Starts the Android activity for an intent action. Replaced in tests, where the intent plugin does nothing off a device.
getter/setter pair

Static Methods

describe(Permission permission) → String

Constants

locationPermission → const PermissionWithService
The location permission the flow asks for, on both platforms. Only while-in-use access is needed: on Android that is the fine and coarse location pair, and on iOS it behaves exactly like Permission.location.
locationSettingsAction → const String
Android's settings screen for the device-wide location switch.
lostRequestTimeout → const Duration
How long the app can sit in the foreground with a request unanswered before that answer is taken to be lost. See _requestOrRecover.
requiredPermissions → const List<Permission>