FeatureClient class
Feature client - orchestrates evaluation without caching
- Available extensions
Constructors
-
FeatureClient({required ClientMetadata metadata, required HookManager hookManager, Iterable<
Hook> apiHooksResolver()?, required EvaluationContext defaultContext, EvaluationContext? apiContext, EvaluationContext apiContextResolver()?, FeatureProvider? provider, FeatureProvider providerResolver()?, ProviderState providerStatusResolver(FeatureProvider)?, TransactionContextManager? transactionManager, Stream<OpenFeatureEvent> ? eventStream, EventScope? eventScope})
Properties
-
events
→ Stream<
OpenFeatureEvent> -
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- metadata → ClientMetadata
-
final
- provider → FeatureProvider
-
Access to provider for management operations
no setter
- providerStatus → ProviderState
-
Current status of the provider bound to this client.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addEventHandler(
OpenFeatureEventType type, EventHandler handler) → void -
addHandler(
void handler(OpenFeatureEvent event)) → StreamSubscription< OpenFeatureEvent> -
addHook(
Hook hook) → void -
addHooks(
Iterable< Hook> hooks) → void -
dispose(
) → Future< void> -
getBooleanDetails(
String flagKey, {EvaluationContext? context, EvaluationOptions? options, bool defaultValue = false}) → Future< FlagEvaluationDetails< bool> > -
Available on FeatureClient, provided by the ClientEvaluationDetails extension
Get boolean flag with full evaluation details -
getBooleanEvaluationDetails(
String flagKey, {required bool defaultValue, EvaluationContext? context, EvaluationOptions? options}) → Future< FlagEvaluationDetails< bool> > -
Available on FeatureClient, provided by the RequiredDefaultEvaluation extension
Detailed boolean evaluation with an explicit application fallback. -
getBooleanFlag(
String flagKey, {EvaluationContext? context, EvaluationOptions? options, bool defaultValue = false}) → Future< bool> - Evaluate boolean flag
-
getBooleanValue(
String flagKey, {required bool defaultValue, EvaluationContext? context, EvaluationOptions? options}) → Future< bool> -
Available on FeatureClient, provided by the RequiredDefaultEvaluation extension
Evaluates a boolean flag with an explicit application fallback. -
getDoubleDetails(
String flagKey, {EvaluationContext? context, EvaluationOptions? options, double defaultValue = 0.0}) → Future< FlagEvaluationDetails< double> > -
Available on FeatureClient, provided by the ClientEvaluationDetails extension
Get double flag with full evaluation details -
getDoubleEvaluationDetails(
String flagKey, {required double defaultValue, EvaluationContext? context, EvaluationOptions? options}) → Future< FlagEvaluationDetails< double> > -
Available on FeatureClient, provided by the RequiredDefaultEvaluation extension
Detailed double evaluation with an explicit application fallback. -
getDoubleFlag(
String flagKey, {EvaluationContext? context, EvaluationOptions? options, double defaultValue = 0.0}) → Future< double> - Evaluate double flag
-
getDoubleValue(
String flagKey, {required double defaultValue, EvaluationContext? context, EvaluationOptions? options}) → Future< double> -
Available on FeatureClient, provided by the RequiredDefaultEvaluation extension
Evaluates a double flag with an explicit application fallback. -
getIntegerDetails(
String flagKey, {EvaluationContext? context, EvaluationOptions? options, int defaultValue = 0}) → Future< FlagEvaluationDetails< int> > -
Available on FeatureClient, provided by the ClientEvaluationDetails extension
Get integer flag with full evaluation details -
getIntegerEvaluationDetails(
String flagKey, {required int defaultValue, EvaluationContext? context, EvaluationOptions? options}) → Future< FlagEvaluationDetails< int> > -
Available on FeatureClient, provided by the RequiredDefaultEvaluation extension
Detailed integer evaluation with an explicit application fallback. -
getIntegerFlag(
String flagKey, {EvaluationContext? context, EvaluationOptions? options, int defaultValue = 0}) → Future< int> - Evaluate integer flag
-
getIntegerValue(
String flagKey, {required int defaultValue, EvaluationContext? context, EvaluationOptions? options}) → Future< int> -
Available on FeatureClient, provided by the RequiredDefaultEvaluation extension
Evaluates a integer flag with an explicit application fallback. -
getMetrics(
) → ClientMetrics -
getObjectDetails(
String flagKey, {EvaluationContext? context, EvaluationOptions? options, Map< String, dynamic> defaultValue = const {}}) → Future<FlagEvaluationDetails< Map< >String, dynamic> > -
Available on FeatureClient, provided by the ClientEvaluationDetails extension
Get object flag with full evaluation details -
getObjectEvaluationDetails(
String flagKey, {required Map< String, dynamic> defaultValue, EvaluationContext? context, EvaluationOptions? options}) → Future<FlagEvaluationDetails< Map< >String, dynamic> > -
Available on FeatureClient, provided by the RequiredDefaultEvaluation extension
Detailed object evaluation with an explicit application fallback. -
getObjectFlag(
String flagKey, {EvaluationContext? context, EvaluationOptions? options, Map< String, dynamic> defaultValue = const {}}) → Future<Map< String, dynamic> > -
getObjectValue(
String flagKey, {required Map< String, dynamic> defaultValue, EvaluationContext? context, EvaluationOptions? options}) → Future<Map< String, dynamic> > -
Available on FeatureClient, provided by the RequiredDefaultEvaluation extension
Evaluates a object flag with an explicit application fallback. -
getStringDetails(
String flagKey, {EvaluationContext? context, EvaluationOptions? options, String defaultValue = ''}) → Future< FlagEvaluationDetails< String> > -
Available on FeatureClient, provided by the ClientEvaluationDetails extension
Get string flag with full evaluation details -
getStringEvaluationDetails(
String flagKey, {required String defaultValue, EvaluationContext? context, EvaluationOptions? options}) → Future< FlagEvaluationDetails< String> > -
Available on FeatureClient, provided by the RequiredDefaultEvaluation extension
Detailed string evaluation with an explicit application fallback. -
getStringFlag(
String flagKey, {EvaluationContext? context, EvaluationOptions? options, String defaultValue = ''}) → Future< String> - Evaluate string flag
-
getStringValue(
String flagKey, {required String defaultValue, EvaluationContext? context, EvaluationOptions? options}) → Future< String> -
Available on FeatureClient, provided by the RequiredDefaultEvaluation extension
Evaluates a string flag with an explicit application fallback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeEventHandler(
OpenFeatureEventType type, EventHandler handler) → void -
removeHandler(
StreamSubscription< OpenFeatureEvent> handler) → Future<void> -
removeHook(
Hook hook) → void -
toString(
) → String -
A string representation of this object.
inherited
-
track(
String trackingEventName, {EvaluationContext? context, TrackingEventDetails? trackingDetails}) → Future< void> - Compatibility tracking API that can be awaited for transport completion.
-
trackEvent(
String trackingEventName, {EvaluationContext? context, TrackingEventDetails? trackingDetails}) → void - Experimental nonblocking tracking (6.1.1.1). Transport errors are contained. Use track only when existing application code needs to await transport.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited