value property
The current value stored in this notifier.
When the value is replaced with something that is not equal to the old value as evaluated by the equality operator ==, this class notifies its listeners.
Implementation
@override
T get value => _value;
Implementation
@override
set value(Map<String, dynamic> value) {
super.value = value;
// Update the preferences
_prefsFuture.then((prefs) {
value.forEach((key, value) {
if (value is int) {
prefs.setInt(key, value);
} else if (value is bool) {
prefs.setBool(key, value);
} else if (value is String) {
prefs.setString(key, value);
} else if (value is double) {
prefs.setDouble(key, value);
}
});
});
}