MemoryLocalConfig mixin

A mixin that implements default functionality in LocalConfig. If you don't need to implement special features, you can use this mixin to create a LocalConfig

example:

class HogehogeLocalConfig extends LocalConfig with MemoryLocalConfig {
  // Processes you want to add, override, etc...
  @override
  bool getBool(String key, {bool defaultValue = Config.defaultValueForBool}) {
    return super.getBool(key, defaultValue: false);
  }
...
}
Superclass Constraints

Properties

defaults Map<String, Object>
The default data for the data managed by this class, in the form of a Map with keys and values.
final
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
store Map<String, Object>
The data managed by this class, in the form of a Map with keys and values.
final

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
dispose() → void
Disposes the configuration.
inherited
getBool(String key, {bool defaultValue = Config.defaultValueForBool}) bool
Returns the value corresponding to the given key as a Boolean.
override
getDouble(String key, {double defaultValue = Config.defaultValueForDouble}) double
Returns the value corresponding to the given key as a Double.
override
getInt(String key, {int defaultValue = Config.defaultValueForInt}) int
Returns the value corresponding to the given key as an Integer.
override
getString(String key, {String defaultValue = Config.defaultValueForString}) String
Returns the value corresponding to the given key as a String.
override
hasKey(String key) bool
Checks if the given key exists in the configuration.
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
reset(String key) Future<void>
Resets the configuration item corresponding to the given key to its default value.
override
resetAll() Future<void>
Resets all configuration items to their default values.
override
resetMany(List<String> keys) Future<void>
Resets the configuration items corresponding to the given list of keys to their default values.
override
setBool(String key, bool value) Future<void>
Sets the value of the given key to the specified Boolean value.
override
setDefaults(Map<String, Object> defaults) Future<void>
Sets the default values for the configuration.
override
setDouble(String key, double value) Future<void>
Sets the value of the given key to the specified Double value.
override
setInt(String key, int value) Future<void>
Sets the value of the given key to the specified Integer value.
override
setMany(Map<String, Object> objects) Future<void>
Sets the values of multiple keys at once.
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>
Sets the value of the given key to the specified String value.
override
toString() String
A string representation of this object.
inherited

Operators

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