BloomModulePermission class

Represents a permission declared in bloom.module.yaml.

Encapsulates platform-specific permission keys for Android manifest and iOS Info.plist, as well as the default rationale prompt and whether the permission is optional.

Example:

const cameraPerm = BloomModulePermission(
  name: 'camera',
  androidPermission: 'android.permission.CAMERA',
  iosPlistKey: 'NSCameraUsageDescription',
  defaultPrompt: 'Allow camera access to capture photos',
);

Constructors

BloomModulePermission({required String name, String? androidPermission, String? iosPlistKey, String defaultPrompt = '', bool optional = false})
Creates a BloomModulePermission descriptor.
const
BloomModulePermission.fromYaml(String name, dynamic value)
Parses a BloomModulePermission from a YAML map or dynamic value.
factory

Properties

androidPermission → String?
Android manifest permission string (e.g. 'android.permission.CAMERA').
final
defaultPrompt → String
Default prompt message shown to the user when requesting permission.
final
hashCode → int
The hash code for this object.
no setterinherited
iosPlistKey → String?
iOS Info.plist usage description key (e.g. 'NSCameraUsageDescription').
final
name → String
Permission name identifier (e.g. 'camera', 'location').
final
optional → bool
Whether this permission is optional for the module's core functionality.
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
toJson() → Map<String, dynamic>
Serializes this permission definition to a JSON-compatible map.
toString() → String
A string representation of this object.
inherited

Operators

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