FeatureFlagService class

Feature flag service — manages feature flags with local + remote eval.

Constructors

FeatureFlagService()

Properties

hashCode → int
The hash code for this object.
no setterinherited
keys → Set<String>
All registered flag keys.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

addListener(void listener()) → void
Register a listener for flag changes.
getBool(String key, {bool defaultValue = false}) → bool
Get a boolean flag value.
getNum(String key, {num defaultValue = 0}) → num
Get a numeric flag value.
getString(String key, {String defaultValue = ''}) → String
Get a string flag value.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
override(String key, dynamic value) → void
Override a flag locally (for testing/debug).
register<T>(String key, T defaultValue) → FeatureFlag<T>
Register a feature flag.
removeListener(void listener()) → void
Remove a listener.
toString() → String
A string representation of this object.
inherited
updateFromRemote(Map<String, dynamic> config) → void
Update flags from remote config (e.g., GrowthBook).

Operators

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