RemoteConfig class

A RemoteConfig represents a Remote Config template.

A project's Remote Config template is evaluated during each application instance's fetch. The resolved value of a parameter is determined as follows: Given the conditional values that refer to true conditions for the application instance, the parameter's resolved value is the conditional value whose name is the earliest in the conditions list. Else, if the parameter has a default value, the resolved value is set to the default value. Else, the parameter has no value and is omitted from the result that the application instance fetches. For example, assume we have parameter key fruit, with default value pear and conditional value submap {"is_ios": "apple", "is_in_20_percent": "banana"} where "is_ios" and "is_20_percent" are names of conditions in the ordered condition list. The value of fruit would evaluate to apple if is_ios is true. Otherwise, if is_in_20_percent is true, fruit would evaluate to banana, and if is_ios and is_in_20_percent are both false, fruit would evaluate to pear. If no default value were specified, and is_ios and is_in_20_percent were both false, no value for fruit would be returned from the Remote Config server to the client. Once a project's Remote Config template has been published via a successful UpdateRemoteConfig call, clients can fetch these parameter values and display them to users.

Constructors

RemoteConfig({List<RemoteConfigCondition>? conditions, Map<String, RemoteConfigParameterGroup>? parameterGroups, Map<String, RemoteConfigParameter>? parameters, Version? version})
RemoteConfig.fromJson(Map _json)

Properties

conditions List<RemoteConfigCondition>?
A list of conditions in descending order by priority.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
parameterGroups Map<String, RemoteConfigParameterGroup>?
Map of parameter group names to their descriptions and grouped parameters.
getter/setter pair
parameters Map<String, RemoteConfigParameter>?
Map of parameter keys to their optional default values and optional conditional values.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
version Version?
Output only, except for the version description.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

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