ExperimentClient class abstract

Public interface for interacting with the Amplitude Experiment SDK.

Obtain an instance via Experiment.initialize or Experiment.initializeWithAmplitude. Do not implement or extend.

Constructors

ExperimentClient()

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

all() Future<Map<String, Variant>>
Returns all flag variants currently assigned to the user.
clear() Future<void>
Clears all locally stored flag data.
exposure(String flagKey) Future<void>
Manually triggers an exposure event for the given flagKey.
fetch([ExperimentUser? user, FetchOptions? options]) Future<void>
Fetches flag variants from the server for the given user.
getUser() Future<ExperimentUser>
Returns the current user context.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setTracksAssignment(bool tracksAssignment) Future<void>
Enables or disables automatic assignment tracking.
setUser(ExperimentUser user) Future<void>
Sets the user context for subsequent flag evaluations.
start(ExperimentUser? user) Future<void>
Starts the SDK, optionally setting the initial user context.
stop() Future<void>
Stops the SDK and releases resources.
toString() String
A string representation of this object.
inherited
variant(String flagKey, [Variant? fallbackVariant]) Future<Variant>
Returns the variant for a single flagKey.

Operators

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