HeadlessFeatureKey<T> class
final
Type-safe key for accessing typed features in feature bags.
Used with both HeadlessItemFeatures (item-level) and HeadlessRequestFeatures (request-level).
Example:
const myFeatureKey = HeadlessFeatureKey<String>(#myFeature);
final features = HeadlessItemFeatures.build((b) {
b.set(myFeatureKey, 'value');
});
final value = features.get(myFeatureKey); // 'value'
- Annotations
Constructors
- HeadlessFeatureKey(Symbol id, {String? debugName})
-
const
Properties
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.
override