CkPermissionHandler class

Handles a single permission request with automatic status checking, re-requesting, and showing a permanently-denied dialog.

Uses CkPermission — no need to import permission_handler directly.

Example:

final handler = CkPermissionHandler(permission: CkPermission.camera);
final granted = await handler.getStatus();

Constructors

CkPermissionHandler({required CkPermission permission})
const

Properties

hashCode int
The hash code for this object.
no setterinherited
permission CkPermission
The permission to manage. Use CkPermission values.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getStatus() Future<bool>
Checks the current permission status, requests it if not granted, and shows a dialog if permanently denied.
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