RemoteConfig class
The entry point for accessing Remote Config.
You can get an instance by calling RemoteConfig.instance. Note RemoteConfig.instance is async.
- Inheritance
-
- Object
- PlatformInterface
- FirebasePluginPlatform
- RemoteConfig
- Mixed in types
Properties
- app → FirebaseApp
-
The
FirebaseApp
this instance was initialized with.final - hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- lastFetchStatus → RemoteConfigFetchStatus
-
Returns the status of the last fetch attempt.
no setter
- lastFetchTime → DateTime
-
Returns the DateTime of the last successful fetch.
no setter
- pluginConstants → Map
-
Returns any plugin constants this plugin app instance has initialized.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- settings → RemoteConfigSettings
-
Returns the RemoteConfigSettings of the current instance.
no setter
Methods
-
activate(
) → Future< bool> - Makes the last fetched config available to getters.
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
dispose(
) → void -
Discards any resources used by the object. After this is called, the
object is not in a usable state and should be discarded (calls to
addListener will throw after the object is disposed).
inherited
-
ensureInitialized(
) → Future< void> - Ensures the last activated config are available to getters.
-
fetch(
) → Future< void> - Fetches and caches configuration from the Remote Config service.
-
fetchAndActivate(
) → Future< bool> - Performs a fetch and activate operation, as a convenience.
-
getAll(
) → Map< String, RemoteConfigValue> - Returns a Map of all Remote Config parameters.
-
getBool(
String key) → bool - Gets the value for a given key as a bool.
-
getDouble(
String key) → double - Gets the value for a given key as a double.
-
getInt(
String key) → int - Gets the value for a given key as an int.
-
getString(
String key) → String - Gets the value for a given key as a String.
-
getValue(
String key) → RemoteConfigValue - Gets the RemoteConfigValue for a given key.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
setConfigSettings(
RemoteConfigSettings remoteConfigSettings) → Future< void> - Sets the RemoteConfigSettings for the current instance.
-
setDefaults(
Map< String, dynamic> defaultParameters) → Future<void> - Sets the default parameter values for the current instance. Only booleans, strings and numbers are supported as values of the map
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → RemoteConfig
-
Returns an instance using the default
FirebaseApp
.no setter
Static Methods
-
instanceFor(
{required FirebaseApp app}) → RemoteConfig -
Returns an instance using the specified
FirebaseApp
.