CkPermission enum
CoreKit's cross-platform permission descriptor.
Use CkPermission values with CkPermissionHelper and CkPermissionHandler
instead of importing permission_handler directly.
Example:
final granted = await CkPermissionHelper.request(CkPermission.camera);
- Inheritance
- Available extensions
Values
- camera → const CkPermission
-
Device camera.
- location → const CkPermission
-
Device location (best accuracy, background + foreground).
- locationWhenInUse → const CkPermission
-
Device location only while the app is in use.
- locationAlways → const CkPermission
-
Device location always (including background).
- microphone → const CkPermission
-
Device microphone.
- photos → const CkPermission
-
Photo library (read).
- photosAddOnly → const CkPermission
-
Photo library (write / add-only).
- storage → const CkPermission
-
External storage (Android legacy).
- notification → const CkPermission
-
Push / local notifications.
- contacts → const CkPermission
-
Device contacts.
- sms → const CkPermission
-
SMS messages.
- bluetooth → const CkPermission
-
Bluetooth (general).
- bluetoothScan → const CkPermission
-
Bluetooth scan.
- bluetoothAdvertise → const CkPermission
-
Bluetooth advertise.
- bluetoothConnect → const CkPermission
-
Bluetooth connect.
- mediaLibrary → const CkPermission
-
Media library (music, podcasts, etc. — primarily iOS/macOS).
Properties
- displayName → String
-
Available on CkPermission, provided by the CkPermissionMapper extension
Returns a human-readable name for display in dialogs / logs.no setter - displayName → String
-
Available on Enum, provided by the EnumDisplayName extension
no setter - 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
-
ensure(
) → Future< bool> -
Available on CkPermission, provided by the CkPermissionEnsureX extension
Ensures this permission is granted before proceeding. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolveForPlatform(
{required bool isAndroid}) → Permission -
Available on CkPermission, provided by the CkPermissionMapper extension
Resolves the correct nativePermissionfor the given platform context. -
toNative(
) → Permission -
Available on CkPermission, provided by the CkPermissionMapper extension
Returns the underlyingPermissionobject used bypermission_handler. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
values
→ const List<
CkPermission> - A constant List of the values in this enum, in order of their declaration.