getInt method
Starts with the current int value for the given key
, then emits a new
value every time there are changes to the value associated with key
.
If the value is null, starts with the value provided in defaultValue
. When
the value transitions from non-null to null (ie. when the value is removed),
emits defaultValue
.
Implementation
Preference<int> getInt(String key, {required int defaultValue}) {
return getCustomValue(
key,
defaultValue: defaultValue,
adapter: IntAdapter.instance,
);
}