nullableStringDecoder function

Decoder<String?> nullableStringDecoder()

Decoder for a Setting that manages a String. If the value is not in the underlying Storage, null is returned.

Implementation

Decoder<String?> nullableStringDecoder() {
  return (value) => value is! StringSettingValue ? null : value.value;
}