Settings class abstract

A class that manages settings. Settings are persisted to an underlying Storage implementation. Each setting is represented by a Setting.

Available extensions

Constructors

Settings.new(Storage storage)
A class that manages settings. Settings are persisted to an underlying Storage implementation. Each setting is represented by a Setting.

Properties

allSettings → ReadableBeacon<Map<String, dynamic>>
A ReadableBeacon that emits a map of all settings.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

boolSetting({required String key, bool defaultValue = false}) Setting<bool>

Available on Settings, provided by the SettingsX extension

Creates a new Setting that manages a bool.
clear() → void
Clears all settings by calling Setting.reset on each setting in the cache.
derivedSetting<T, I>({required String key, required ReadableBeacon<I> input, required T decode(RawSettingValue, I), required RawSettingValue encode(T)}) Setting<T>

Available on Settings, provided by the SettingsX extension

A Setting that is derived from input. Any time the input changes, the decode function will be invoked with the current value of the returned Setting as well as the new value of input. Similarly, any time the returned Setting changes, the decode function will be invoked with the new value of the returned Setting as well as the current value of input.
dispose() → void
Disposes all Beacons associated with this Settings instance.
doubleSetting({required String key, double defaultValue = 0.0}) Setting<double>

Available on Settings, provided by the SettingsX extension

Creates a new Setting that manages a double.
intSetting({required String key, int defaultValue = 0}) Setting<int>

Available on Settings, provided by the SettingsX extension

Creates a new Setting that manages an int.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setting<T>({required String key, required Decoder<T> decode, required Encoder<T> encode}) Setting<T>
Creates a new Setting.
stringListSetting({required String key}) Setting<List<String>>

Available on Settings, provided by the SettingsX extension

Creates a new Setting that manages a List<String>.
stringSetting({required String key}) Setting<String?>

Available on Settings, provided by the SettingsX extension

Creates a new Setting that manages a String.
toString() String
A string representation of this object.
inherited

Operators

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