ProxyLocalConfig class

Class for managing all LocalConfig used by the app. If multiple local configurations are added, the most recently added local configuration is used as the current LocalConfig.

Access to LocalConfig is usually done through this class.

example:

tApp.getPlugin<ProxyLocalConfig>()?.getBool('key');
Inheritance

Constructors

ProxyLocalConfig()
Create a ProxyLocalConfig

Properties

disposed bool
Indicates whether the configuration has been disposed.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
initialized bool
Indicates whether the configuration has been initialized.
no setterinherited
methodCallLogs List<MethodCall>
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
addLocalConfig(LocalConfig localConfig) Future<void>
This adds the localConfig to the LocalConfigs managed by this class.
dispose() → void
Disposes the configuration.
override
getBool(String key, {bool defaultValue = Config.defaultValueForBool}) bool
Retrieves the bool value with the name key from the current LocalConfig. If it cannot be retrieved, defaultValue is returned.
override
getDouble(String key, {double defaultValue = Config.defaultValueForDouble}) double
Retrieves the double value with the name key from the current LocalConfig. If it cannot be retrieved, defaultValue is returned.
override
getInt(String key, {int defaultValue = Config.defaultValueForInt}) int
Retrieves the int value with the name key from the current LocalConfig. If it cannot be retrieved, defaultValue is returned.
override
getString(String key, {String defaultValue = Config.defaultValueForString}) String
Retrieves the String value with the name key from the current LocalConfig. If it cannot be retrieved, defaultValue is returned.
override
hasKey(String key) bool
This class checks whether the current LocalConfig managed by it contains a key with the name key.
override
init() Future<void>
Initializes the configuration.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
onChange() → void
The value of Config has been changed.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
removeLocalConfig(LocalConfig localConfig) → void
This removes localConfig from the LocalConfigs managed by this class.
reset(String key) Future<void>
This removes the value with the name key from the current LocalConfig.
override
resetAll() Future<void>
This removes all values from the current LocalConfig.
override
resetMany(List<String> keys) Future<void>
This removes the values with the names specified in keys from the current LocalConfig.
override
setBool(String key, bool value) Future<void>
This sets the bool value value with the name key to the current LocalConfig.
override
setDefaults(Map<String, Object> defaults) Future<void>
This sets the default values for all LocalConfig managed by this class to the values specified in defaults. If values are already set, it overwrites them with the default values.
override
setDouble(String key, double value) Future<void>
This sets the double value value with the name key to the current LocalConfig.
override
setInt(String key, int value) Future<void>
This sets the int value value with the name key to the current LocalConfig.
override
setMany(Map<String, Object> objects) Future<void>
This sets the key-value pairs specified in the objects map of type Map<String, Object> to the current LocalConfig.
override
setMockMethodCallHandler() → void
A function for mocking a MethodChannel.
inherited
setMockStreamHandler() → void
A function for mocking a MockStreamHandler.
inherited
setString(String key, String value) Future<void>
This sets the String value value with the name key to the current LocalConfig.
override
toString() String
A string representation of this object.
inherited

Operators

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