PermissionInfo class final
Represents a permission with its Android and iOS equivalents.
This class encapsulates all information about a permission:
- A unique key for CLI lookups
- Display name and description for the UI
- Category for grouping
- Android permission string (required)
- iOS plist key and default description (optional)
Example
const cameraPermission = PermissionInfo(
key: 'camera',
displayName: 'Camera',
description: 'Take photos and videos',
category: PermissionCategory.camera,
androidPermission: 'android.permission.CAMERA',
iosPermissionKey: 'NSCameraUsageDescription',
iosDefaultDescription: 'This app needs camera access.',
);
Constructors
- PermissionInfo({required String key, required String displayName, required String description, required PermissionCategory category, required String androidPermission, String? iosPermissionKey, String? iosDefaultDescription})
-
Creates a new PermissionInfo instance.
const
Properties
- androidPermission → String
-
The Android Manifest permission string.
final
- category → PermissionCategory
-
Category for grouping in the interactive menu.
final
- description → String
-
Brief description of what the permission allows.
final
- displayName → String
-
Human-readable name displayed in the interactive menu.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- iosDefaultDescription → String?
-
Default usage description for iOS (null if iOS not supported).
final
- iosPermissionKey → String?
-
The iOS Info.plist key for this permission (null if iOS not supported).
final
- key → String
-
Unique key for CLI lookups (e.g., 'camera', 'location').
final
- 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