getString method
Starts with the current String 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<String> getString(String key, {required String defaultValue}) {
return getCustomValue(
key,
defaultValue: defaultValue,
adapter: StringAdapter.instance,
);
}