withPersistence<T> static method
Create a store with persistence
Implementation
static OpinionatedStore<T> withPersistence<T>(
T initialState,
void Function(T) save,
) {
return OpinionatedStoreBuilder<T>(initialState)
.withSideEffect((state) => save(state))
.build();
}