BtcPermissionStatus enum Enums

Whether the app holds the Bluetooth permissions the platform requires.

Status Description
granted Every required permission is held
denied Not held, but the system will still show a prompt
permanentlyDenied Refused for good; only app settings can change it
notRequired The platform has no runtime Bluetooth permission

Only Android and iOS gate Bluetooth behind a runtime prompt. Windows, macOS and Linux report notRequired, since their access is decided at build time by a manifest entry or an entitlement rather than by the user at runtime.

The two differ in what a refusal costs. On Android it blocks scanning and connecting outright. On iOS the permission governs CoreBluetooth, which this plugin uses only to read adapter state, so a refusal shows up as BtcAdapterState.unauthorized while reaching an MFi accessory still works; that path is gated by the protocol strings the app declares instead.

Inheritance
Available extensions

Values

granted → const BtcPermissionStatus

Every permission the platform requires is held. Bluetooth calls will not throw BtcPermissionException.

denied → const BtcPermissionStatus

Not held yet, and the system will still show a prompt when asked.

This covers both "never asked" and "asked once and dismissed". Calling requestPermissions from this state shows the system dialog.

permanentlyDenied → const BtcPermissionStatus

Refused in a way the system will not prompt for again.

On Android this is a second refusal, or one with "don't ask again" selected; on iOS, any refusal. requestPermissions cannot recover from here and returns this same status without showing anything, so send the user to openAppSettings instead.

notRequired → const BtcPermissionStatus

The platform has no runtime Bluetooth permission to hold.

Reported by Windows, macOS and Linux. Treat it exactly like granted: there is nothing to request and nothing for the user to fix.

Properties

hashCode → int
The hash code for this object.
no setterinherited
index → int
A numeric identifier for the enumerated value.
no setterinherited
name → String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Operators

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

Constants

values → const List<BtcPermissionStatus>
A constant List of the values in this enum, in order of their declaration.