LocalConfig class abstract
Abstract class for the LocalConfig.
Config for saving data locally. Also, please check the mixin for implementing basic functionality in MemoryLocalConfig.
- Inheritance
-
- Object
- ChangeNotifier
- Config
- LocalConfig
- Mixed-in types
- Implementers
Constructors
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
-
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.inherited -
getDouble(
String key, {double defaultValue = Config.defaultValueForDouble}) → double -
Returns the value corresponding to the given
key
as a Double.inherited -
getInt(
String key, {int defaultValue = Config.defaultValueForInt}) → int -
Returns the value corresponding to the given
key
as an Integer.inherited -
getString(
String key, {String defaultValue = Config.defaultValueForString}) → String -
Returns the value corresponding to the given
key
as a String.inherited -
hasKey(
String key) → bool -
Checks if the given
key
exists in the configuration.inherited -
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.inherited -
resetAll(
) → Future< void> -
Resets all configuration items to their default values.
inherited
-
resetMany(
List< String> keys) → Future<void> -
Resets the configuration items corresponding to the given list of
keys
to their default values.inherited -
setBool(
String key, bool value) → Future< void> -
Sets the value of the given
key
to the specified Booleanvalue
.inherited -
setDefaults(
Map< String, Object> defaults) → Future<void> -
Sets the default values for the configuration.
inherited
-
setDouble(
String key, double value) → Future< void> -
Sets the value of the given
key
to the specified Doublevalue
.inherited -
setInt(
String key, int value) → Future< void> -
Sets the value of the given
key
to the specified Integervalue
.inherited -
setMany(
Map< String, Object> objects) → Future<void> -
Sets the values of multiple keys at once.
inherited
-
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 Stringvalue
.inherited -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited