Config class Null safety

Config is a config service that seeks to allow app developers to have configuration services over their app.

For example, a developer could bake in a green theme for the day of the Saint Patrick's Holiday. Further, a developer could roll out, into production, the ability for the developers to test real-world changes while only exposing those changes to the developers.

  • The Config service is designed to provide the least disruptive experience to users possible. In light of this goal, fetched configs will only be applied when the app leaves memory and relaunches. This will guarantee a continuity of the user experience that is not jarring if a new config gets rolled out mid-session.

  • In this basic usage all that is necessary is to call fetch on the shared instance. The code may then check feature flags with the assurance that the UI experience will be consistent.

  • However, it is often the case that a developer would like to be more aggressive with the application of a config. To satisfy that need the FConfig service supplies an observer that an object may subscribe to.

  • As events happen, such as successful fetching or the activation of a config, the object that is observing may take action. This allows the developer to have more control over the configuration service if it is necessary.




hashCode int
The hash code for this object.
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


activateConfig() → void
Aggressively activates the latest config if it has not been activated.
fetchConfig() → void
Fetches the most recent config from the server for this client.
getConfigString(String key, String defaultValue) Future<String>
Gets the string value for the given key.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
registerListener(ConfigListener listener) → void
Registers an observer.
toString() String
A string representation of this object.
unregisterListener(ConfigListener listener) → void
Unregisters an observer.


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

Static Properties

configAgent ↔ ConfigAgent?
read / write