RemoteConfig class
Provides access to Remote Config service.
Properties
-
defaultConfig
↔ Map<
String, dynamic> -
Contains default values for configs. To set default config, compose a map and then assign it to
defaultConfig
. Any modifications to the map after the assignment will not take effect.getter/setter pair - fetchTime → DateTime?
-
Returns the timestamp of the last successful fetch, or
null
if the instance either hasn't fetched or initialization is incomplete.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- jsObject → RemoteConfigJsImpl
-
JS object.
finalinherited
- lastFetchStatus → RemoteConfigFetchStatus
-
The status of the last fetch attempt.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- settings → RemoteConfigSettings
-
Defines configuration for the Remote Config SDK.
no setter
Methods
-
activate(
) → Future< bool> -
Makes the last fetched config available to the getters.
Returns a future which resolves to
true
if the current call activated the fetched configs. If the fetched configs were already activated, the promise will resolve tofalse
. -
ensureInitialized(
) → Future< void> - Ensures the last activated config are available to the getters.
-
fetch(
) → Future< void> - Fetches and caches configuration from the Remote Config service.
-
fetchAndActivate(
) → Future< bool> - Performs fetch and activate operations, as a convenience. Returns a promise which resolves to true if the current call activated the fetched configs. If the fetched configs were already activated, the promise will resolve to false.
-
getAll(
) → Map< String, RemoteConfigValue> - Returns all config values.
-
getBoolean(
String key) → bool -
Gets the value for the given key as a boolean.
Convenience method for calling
remoteConfig.getValue(key).asString()
. -
getNumber(
String key) → num -
Gets the value for the given key as a number.
Convenience method for calling
remoteConfig.getValue(key).asNumber()
. -
getString(
String key) → String -
Gets the value for the given key as a string.
Convenience method for calling
remoteConfig.getValue(key).asString()
. -
getValue(
String key) → RemoteConfigValue - Gets the value for the given key.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setLogLevel(
RemoteConfigLogLevel value) → void -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
getInstance(
RemoteConfigJsImpl jsObject) → RemoteConfig