ConfigCatClient class
ConfigCat SDK client.
Constructors
- ConfigCatClient.get({required String sdkKey, ConfigCatOptions options = const ConfigCatOptions()})
-
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
- httpClient → Dio
-
Gets the underlying
Dio
HTTP client.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
forceRefresh(
) → Future< void> - Initiates a force refresh on the cached configuration.
-
getAllKeys(
) → Future< List< String> > - Gets a collection of all setting keys.
-
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 givenkey
. -
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
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
close(
{ConfigCatClient? client}) → void - Closes an individual or all ConfigCatClient instances.