FeatureFlagRepository class

Manages the lifecycle, storage, and retrieval of feature flags.

This repository coordinates between local defaults, remote configurations, and persistent user overrides.

Constructors

FeatureFlagRepository({required FeatureFlagService service, required SharedPreferencesAsync prefs})

Properties

hashCode int
The hash code for this object.
no setterinherited
onUpdated Stream<void>
A stream that emits whenever feature flags are updated from a remote source.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getAllFlags({bool forceRefresh = false}) Future<List<FeatureFlag>>
Retrieves all available feature flags, merging defaults with user overrides.
init() Future<void>
Initializes the repository by loading local defaults into Remote Config and warming up the flag cache.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resetFlag(String key) Future<void>
Resets a feature flag to its default or remote value by removing any local override.
setFlag(String key, dynamic value) Future<void>
Persistently overrides a feature flag value.
toString() String
A string representation of this object.
inherited

Operators

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