string static method

PersistroMastro<String> string(
  1. String key, {
  2. String initial = '',
  3. bool autoSave = true,
})

Creates a persistent string state container.

Implementation

static PersistroMastro<String> string(
  String key, {
  String initial = '',
  bool autoSave = true,
}) {
  return PersistroMastro<String>(
    key: key,
    initial: initial,
    decoder: (json) => json,
    encoder: (value) => value,
    autoSave: autoSave,
  );
}