FeatureCapability class
Default, immutable Capability implementation.
const viewTodos = FeatureCapability(
'todo.view',
requiredPermissions: {AppPermission.todoView},
);
const manageTodos = FeatureCapability(
'todo.manage',
requiredPermissions: {AppPermission.todoAdd, AppPermission.todoDelete},
prerequisites: {viewTodos}, // can only manage what you can view
);
- Implemented types
Constructors
-
FeatureCapability(String id, {Set<
PermissionKey> requiredPermissions = const {}, Set<Capability> prerequisites = const {}}) -
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Stable, unique identifier (useful for logging and cycle detection).
final
-
prerequisites
→ Set<
Capability> -
Other capabilities that must be available before this one.
final
-
requiredPermissions
→ Set<
PermissionKey> -
API-level permissions this capability needs (via its use cases).
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.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited