MultiProvider class
Experimental SDK-level utility for composing multiple providers behind one spec-compliant provider interface.
- Implemented types
Constructors
-
MultiProvider(List<
FeatureProvider> providers, {MultiProviderStrategy strategy = const FirstMatchStrategy(), ProviderConfig config = const ProviderConfig(), ProviderMetadata metadata = const ProviderMetadata(name: 'MultiProvider', version: '0.1.0')})
Properties
- config → ProviderConfig
-
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- metadata → ProviderMetadata
-
no setteroverride
- name → String
-
no setteroverride
-
providers
→ List<
FeatureProvider> -
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state → ProviderState
-
no setteroverride
Methods
-
connect(
) → Future< void> -
override
-
getBooleanFlag(
String flagKey, bool defaultValue, {Map< String, dynamic> ? context}) → Future<FlagEvaluationResult< bool> > -
override
-
getDoubleFlag(
String flagKey, double defaultValue, {Map< String, dynamic> ? context}) → Future<FlagEvaluationResult< double> > -
override
-
getIntegerFlag(
String flagKey, int defaultValue, {Map< String, dynamic> ? context}) → Future<FlagEvaluationResult< int> > -
override
-
getObjectFlag(
String flagKey, Map< String, dynamic> defaultValue, {Map<String, dynamic> ? context}) → Future<FlagEvaluationResult< Map< >String, dynamic> > -
override
-
getStringFlag(
String flagKey, String defaultValue, {Map< String, dynamic> ? context}) → Future<FlagEvaluationResult< String> > -
override
-
initialize(
[Map< String, dynamic> ? config]) → Future<void> -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
shutdown(
) → Future< void> -
override
-
toString(
) → String -
A string representation of this object.
inherited
-
track(
String trackingEventName, {Map< String, dynamic> ? evaluationContext, TrackingEventDetails? trackingDetails}) → Future<void> -
Tracking API (spec Section 6) - record a tracking event
Providers that do not support tracking should silently no-op.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited