EnumFlag<T extends Enum> class

Type-safe enum feature flag

Inheritance

Constructors

EnumFlag.new({required FlagProvider provider, required String key, required T defaultValue, required List<T> values, String? description, Set<String>? tags})

Properties

changes Stream<T>
Gets a stream of value changes for this flag
no setteroverride
defaultValue → T
The default value if the flag is not found or cannot be parsed
finalinherited
description String?
Optional description for documentation purposes
finalinherited
hashCode int
The hash code for this object.
no setterinherited
key String
The unique key for this feature flag
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tags Set<String>?
Optional tags for categorization
finalinherited
value → T
Gets the current value of this flag
no setteroverride
values List<T>
final

Methods

dispose() → void
isValidValue(dynamic value) bool
Validates if a value is valid for this flag type
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parseValue(dynamic value) → T
Parses a raw value into the correct type
override
toString() String
A string representation of this object.
inherited

Operators

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