Configurator class

A class that wraps Remote Config. Its role is to "fetch the configured parameters from remote and provide them".

Exposes fetchAndActivate and configuration methods for Remote Config.

Constructors

Configurator({FirebaseRemoteConfig? rc})

Properties

hashCode int
The hash code for this object.
no setterinherited
onConfigUpdated Stream<RemoteConfigUpdate>
Provide a Stream of updated parameter information.
latefinal
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

activate() Future<bool>
Activate parameters fetched from remote.
configure({required Duration fetchTimeout, required Duration minimumFetchInterval}) Future<void>
Configure settings related to parameter fetching.
fetchAndActivate() Future<bool>
Fetch and activate parameters from remote.
filteredOnConfigUpdated(String key) Stream<RemoteConfigUpdate>
Filter the Stream of updated parameter information by key.
getBool(String key) bool
getBoolConfig(String key, {required ValueChanged<bool> onConfigUpdated}) Config<bool>
Returns a Config of type bool.
getData<T extends Object>({required String key, required T fromJson(Map<String, Object?>)}) → T
Class Object from JSON.
getDataConfig<T extends Object>(String key, {required T fromJson(Map<String, Object?>), required ValueChanged<T> onConfigUpdated}) Config<T>
Returns a Config of type T.
getDouble(String key) double
getDoubleConfig(String key, {required ValueChanged<double> onConfigUpdated}) Config<double>
Returns a Config of type double.
getInt(String key) int
getIntConfig(String key, {required ValueChanged<int> onConfigUpdated}) Config<int>
Returns a Config of type int.
getJson(String key) Map<String, Object?>
Returns a JSON string converted to a Map type.
getJsonConfig(String key, {required ValueChanged<Map<String, Object?>> onConfigUpdated}) Config<Map<String, Object?>>
Returns a Config of type Map.
getListJson(String key) List<Map<String, Object?>>
Returns a List JSON string converted to a List type.
getListJsonConfig(String key, {required ValueChanged<List<Map<String, Object?>>> onConfigUpdated}) Config<List<Map<String, Object?>>>
Returns a Config of type List of Map.
getString(String key) String
getStringConfig(String key, {required ValueChanged<String> onConfigUpdated}) Config<String>
Returns a Config of type String.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setDefaults(Map<String, Object?> defaultParameters) Future<void>
Set default values for when parameters cannot be fetched from remote.
toString() String
A string representation of this object.
inherited

Operators

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