Settings class

Singleton manager for application settings.

Properties

hashCode → int
The hash code for this object.
no setterinherited
initialized ↔ bool
getter/setter pair
isLazy → bool
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Operators

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

Static Properties

i → Settings
Singleton instance.
no setter

Static Methods

arrayRemove(String key, Iterable value, {Object? options}) → bool
Remove elements from a list setting.
arrayUnion(String key, Iterable value, {Object? options}) → bool
Add elements to a list setting, avoiding duplicates.
clear() → Future<bool>
Clear all settings.
get<T>(String key, T defaultValue, {Object? options}) → T
Get a value for a given key.
increment(String key, num value, {Object? options}) → bool
Increment a numeric setting by value.
init({bool showLogs = false, bool lazy = true, Map<String, dynamic>? initial, SettingsDelegate? delegate}) → Future<void>
Initialize the settings manager.
load() → Future<void>
Load settings from the delegate (if provided) into local cache.
set(String key, Object? value, {Object? options}) → bool
Set a value for a given key.