CachingExperimentAdapter class

An ExperimentAdapter that caches the values of experiments to provide faster access to experiment values in production setups.

Inheritance

Properties

experiments List<AdaptedExperiment>
The experiments that are registered with this adapter.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add<T>(AdaptedExperiment<T> experiment) Experiment<T>
override
boolean({required String id, bool defaultVariant = false, Map<bool, int>? weightedVariants, double sampleSize = 1, bool enabled = true}) Experiment<bool>
Registers and returns a new boolean experiment.
inherited
enumerated<T extends Enum>({required String id, required T defaultVariant, List<T>? variants, Map<T, int>? weightedVariants, double sampleSize = 1, bool enabled = true}) Experiment<T>
Registers and returns a new Enum based experiment.
inherited
get<T>(String id) → T?
Returns the value for the experiment with the given id.
override
has(String id) bool
Returns whether this adapter has a value for the experiment with the given id.
override
init(ExperimentConfig config) Future<void>
Initializes this adapter.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
numeric({required String id, int defaultVariant = 0, List<int>? variants, Map<int, int>? weightedVariants, double sampleSize = 1, bool enabled = true}) Experiment<int>
Registers and returns a new numeric experiment.
inherited
text({required String id, String defaultVariant = '', List<String>? variants, Map<String, int>? weightedVariants, double sampleSize = 1, bool enabled = true}) Experiment<String>
Registers and returns a new text experiment.
inherited
toString() String
A string representation of this object.
inherited
update(ExperimentConfig config, {bool force = false}) Future<void>
Updates the values for all experiments, if appropriate.
override

Operators

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