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