ConfigCatClient class

ConfigCat SDK client.

Constructors

ConfigCatClient.get({required String sdkKey, ConfigCatOptions options = ConfigCatOptions.defaultOptions})
Creates a new or gets an already existing ConfigCatClient for the given sdkKey.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
hooks Hooks
Gets the Hooks object for subscribing events.
no setter
httpClient → Dio
Gets the underlying Dio HTTP client.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clearDefaultUser() → void
Sets the default user to null.
close() → void
Closes the underlying resources.
forceRefresh() Future<RefreshResult>
Initiates a force refresh on the cached configuration.
getAllKeys() Future<List<String>>
Gets a collection of all setting keys.
getAllValueDetails({ConfigCatUser? user}) Future<List<EvaluationDetails>>
Gets the values along with evaluation details of all feature flags and settings.
getAllValues({ConfigCatUser? user}) Future<Map<String, dynamic>>
Gets the values of all feature flags or settings.
getAllVariationIds({ConfigCatUser? user}) Future<List<String>>
Gets the Variation IDs (analytics) of all feature flags or settings.
getKeyAndValue<T>({required String variationId}) Future<MapEntry<String, T>?>
Gets the key of a setting and its value identified by the given variationId (analytics).
getValue<T>({required String key, required T defaultValue, ConfigCatUser? user}) Future<T>
Gets the value of a feature flag or setting as T identified by the given key.
getValueDetails<T>({required String key, required T defaultValue, ConfigCatUser? user}) Future<EvaluationDetails<T>>
Gets the value and evaluation details of a feature flag or setting identified by the given key.
getVariationId({required String key, required String defaultVariationId, ConfigCatUser? user}) Future<String>
Gets the Variation ID (analytics) of a feature flag or setting identified by the given key.
isOffline() bool
True when the SDK is configured not to initiate HTTP requests, otherwise false.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setDefaultUser(ConfigCatUser? user) → void
Sets the default user.
setOffline() → void
Configures the SDK to not initiate HTTP requests.
setOnline() → void
Configures the SDK to allow HTTP requests.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

closeAll() → dynamic
Closes all ConfigCatClient instances.