number static method
Creates a persistent numeric state container.
Implementation
static PersistroLightro<num> number(
String key, {
num initial = 0.0,
bool autoSave = true,
}) {
return PersistroLightro<num>(
key: key,
initial: initial,
decoder: (json) => num.parse(json),
encoder: (value) => value.toString(),
autoSave: autoSave,
);
}