getValue

inline suspend fun <T> ConfigCatClient.getValue(key: String, defaultValue: T, user: ConfigCatUser? = null): T(source)

Gets the value of a feature flag or setting as T identified by the given key.

Parameters

key

the identifier of the feature flag or setting.

defaultValue

in case of any failure, this value will be returned.

user

the user object.

T

the type of the desired feature flag or setting. Only the following types are allowed: String, Boolean, Int and Double (both nullable and non-nullable).