SplitClient class abstract
Abstract class representing a Split client.
- Implementers
Constructors
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
-
clearAttributes(
) → Future< bool> - Removes all bound attributes.
-
destroy(
) → Future< void> - Removes the client from memory and stops its synchronization tasks.
-
flush(
) → Future< void> - Forces the client to upload all queued events and impressions.
-
getAttribute(
String attributeName) → Future - Retrieves an attribute previously saved.
-
getAttributes(
) → Future< Map< String, dynamic> > - Retrieves a Map of every attribute currently bound. Keys are attribute names, and values their respective values.
-
getTreatment(
String featureFlagName, [Map< String, dynamic> attributes = const {}, EvaluationOptions evaluationOptions = const EvaluationOptions.empty()]) → Future<String> -
Performs an evaluation for the
featureFlagNamefeature flag. -
getTreatments(
List< String> featureFlagNames, [Map<String, dynamic> attributes = const {}, EvaluationOptions evaluationOptions = const EvaluationOptions.empty()]) → Future<Map< String, String> > - Convenience method to perform multiple evaluations. Returns a Map in which the keys are feature flag names and the values are treatments.
-
getTreatmentsByFlagSet(
String flagSet, [Map< String, dynamic> attributes = const {}, EvaluationOptions evaluationOptions = const EvaluationOptions.empty()]) → Future<Map< String, String> > - Convenience method to perform multiple evaluations by flag set. Returns a Map in which the keys are feature flag names and the values are treatments.
-
getTreatmentsByFlagSets(
List< String> flagSets, [Map<String, dynamic> attributes = const {}, EvaluationOptions evaluationOptions = const EvaluationOptions.empty()]) → Future<Map< String, String> > - Convenience method to perform multiple evaluations by flag sets. Returns a Map in which the keys are feature flag names and the values are treatments.
-
getTreatmentsWithConfig(
List< String> featureFlagNames, [Map<String, dynamic> attributes = const {}, EvaluationOptions evaluationOptions = const EvaluationOptions.empty()]) → Future<Map< String, SplitResult> > - Convenience method to perform multiple evaluations. Returns a Map in which the keys are feature flag names and the values are SplitResult objects.
-
getTreatmentsWithConfigByFlagSet(
String flagSet, [Map< String, dynamic> attributes = const {}, EvaluationOptions evaluationOptions = const EvaluationOptions.empty()]) → Future<Map< String, SplitResult> > - Convenience method to perform multiple evaluations by flag set. Returns a Map in which the keys are feature flag names and the values are SplitResult objects.
-
getTreatmentsWithConfigByFlagSets(
List< String> flagSets, [Map<String, dynamic> attributes = const {}, EvaluationOptions evaluationOptions = const EvaluationOptions.empty()]) → Future<Map< String, SplitResult> > - Convenience method to perform multiple evaluations by flag sets. Returns a Map in which the keys are feature flag names and the values are SplitResult objects.
-
getTreatmentWithConfig(
String featureFlagName, [Map< String, dynamic> attributes = const {}, EvaluationOptions evaluationOptions = const EvaluationOptions.empty()]) → Future<SplitResult> -
Performs and evaluation and returns a SplitResult object for the
featureFlagNamefeature flag. This object contains the treatment alongside the feature flag's configuration, if any. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeAttribute(
String attributeName) → Future< bool> - Removes a specific attribute from storage.
-
setAttribute(
String attributeName, dynamic value) → Future< bool> - Stores a custom attribute value to be used in all evaluations.
-
setAttributes(
Map< String, dynamic> attributes) → Future<bool> - Stores a set of custom attributes to be used in all evaluations.
-
toString(
) → String -
A string representation of this object.
inherited
-
track(
String eventType, {String? trafficType, double? value, Map< String, dynamic> properties = const {}}) → Future<bool> - Enqueue a new event to be sent to Split data collection services.
-
whenReady(
) → Future< SplitClient> - Returns Future that is completed when the most up-to-date information has been retrieved from the Split cloud.
-
whenReadyFromCache(
) → Future< SplitClient> - Returns Future that is completed once the SDK has been able to load definitions from cache. This information is not guaranteed to be the most up-to-date, but all the functionality will be available.
-
whenTimeout(
) → Future< SplitClient> - Returns Future that is completed if the SDK has not been able to get ready in time.
-
whenUpdated(
) → Stream< SplitClient> - Returns Future that is completed when changes have been made, such as creating new feature flags or modifying segments.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited