FeatureType
Represents the type classification of a feature flag.
Feature types distinguish between features controlled remotely via a configuration service and features managed entirely on the local device. This classification helps organize features in the UI and determines the available controls.
Usage
The type is automatically determined from the Feature subclass:
Persistence
When persisting the type to storage, use the ordinal property to store it as an integer, and fromOrdinal to restore it:
// Saving
preferences[key] = featureType.ordinal
// Restoring
val restoredType = FeatureType.fromOrdinal(preferences[key] ?: 0)Filtering
The FeatureFlip UI allows filtering features by type, making it easy to find specific categories of features during development and testing.
See also
Entries
Properties
Functions
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
Returns an array containing the constants of this enum type, in the order they're declared.