DSFeatureFlagManager class

Manages feature flag providers and allows centralized flag querying.

Constructors

DSFeatureFlagManager()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

evaluateFlag(String providerName, String flagKey, {Map<String, dynamic>? context}) Future<DSFeatureFlagEvaluationResult>
Evaluates a feature flag and returns a detailed result from the specified provider.
getBooleanFlag(String providerName, String flagKey, {bool defaultValue = false, Map<String, dynamic>? context}) Future<bool>
Fetches a feature flag as a boolean from the specified provider. Supports passing a context for dynamic evaluations.
getJsonFlag(String providerName, String flagKey, {Map<String, dynamic> defaultValue = const {}, Map<String, dynamic>? context}) Future<Map<String, dynamic>>
Fetches a feature flag as JSON from the specified provider. Supports passing a context for dynamic evaluations.
getNumberFlag(String providerName, String flagKey, {num defaultValue = 0, Map<String, dynamic>? context}) Future<num>
Fetches a feature flag as a number from the specified provider. Supports passing a context for dynamic evaluations.
getStringFlag(String providerName, String flagKey, {String defaultValue = '', Map<String, dynamic>? context}) Future<String>
Fetches a feature flag as a string from the specified provider. Supports passing a context for dynamic evaluations.
registerProvider(String name, DSFeatureFlagProvider provider) → void
Registers a feature flag provider. Throws an error if the provider name is already registered.