SharedValue<T> constructor

SharedValue<T>({
  1. String? key,
  2. required T value,
  3. bool autosave = false,
  4. String? customEncode(
    1. T val
    )?,
  5. T customDecode(
    1. String? val
    )?,
  6. Future<T> customLoad()?,
  7. Future<void> customSave(
    1. T val
    )?,
})

Implementation

SharedValue({
  this.key,
  required T value,
  this.autosave = false,
  this.customEncode,
  this.customDecode,
  this.customLoad,
  this.customSave,
}) : _value = value {
  _update(init: true);
}