boolDecoder function
Decoder for a Setting that manages a bool. If the value is not in
the underlying Storage, defaultValue
is returned.
Implementation
Decoder<bool> boolDecoder({bool defaultValue = false}) {
return (value) => value is BoolSettingValue ? value.value : defaultValue;
}