boolean static method
Creates a persistent boolean state container.
Implementation
static PersistroMastro<bool> boolean(
String key, {
bool initial = false,
bool autoSave = true,
}) {
return PersistroMastro<bool>(
key: key,
initial: initial,
decoder: (json) => json.toLowerCase() == 'true',
encoder: (value) => value.toString(),
autoSave: autoSave,
);
}