CFClientFeatureFlags class
Feature flag evaluation component for CFClient
Constructors
- CFClientFeatureFlags.new({required CFConfig config, required CFUser user, required ConfigManager configManager, required SummaryManager summaryManager, required String sessionId})
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
-
clearDegradationCache(
) → Future< void> - Clear graceful degradation cache
-
clearFlagCache(
String key) → Future< void> - Clear cache for a specific flag
-
enableMethodChaining(
) → CFClientFeatureFlags - Method chaining support - returns the parent client This allows for fluent API usage
-
evaluateWithFullDegradation<
T> ({required String key, required T defaultValue, FallbackStrategy? strategy}) → Future< T> - Evaluate a flag with full async graceful degradation (for critical flags)
-
flagExists(
String key) → bool - Check if a specific flag exists
-
getAllFlags(
) → Map< String, dynamic> - Get all available feature flags
-
getBatchFlags(
Map< String, dynamic> flagRequests) → Map<String, dynamic> - Batch flag evaluation for performance
-
getBoolean(
String key, bool defaultValue) → bool - Evaluate a boolean feature flag
-
getBooleanWithDegradation(
String key, bool defaultValue, {FallbackStrategy? strategy}) → Future< bool> - Evaluate a boolean flag with full async graceful degradation
-
getCacheStats(
) → Future< Map< String, dynamic> > - Get cache statistics
-
getDegradationMetrics(
) → Map< String, dynamic> - Get graceful degradation metrics
-
getFlagOrNull<
T> (String key) → T? - Get flag with nullable safety
-
getJson(
String key, Map< String, dynamic> defaultValue) → Map<String, dynamic> - Evaluate a JSON feature flag
-
getJsonWithDegradation(
String key, Map< String, dynamic> defaultValue, {FallbackStrategy? strategy}) → Future<Map< String, dynamic> > - Evaluate a JSON flag with full async graceful degradation
-
getNumber(
String key, double defaultValue) → double - Evaluate a number feature flag
-
getNumberWithDegradation(
String key, double defaultValue, {FallbackStrategy? strategy}) → Future< double> - Evaluate a number flag with full async graceful degradation
-
getString(
String key, String defaultValue) → String - Evaluate a string feature flag
-
getStringWithDegradation(
String key, String defaultValue, {FallbackStrategy? strategy}) → Future< String> - Evaluate a string flag with full async graceful degradation
-
getTypedFlag<
T> (String key, T defaultValue) → T - Type-safe generic flag evaluation (Enhanced Type Safety)
-
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