PersistState<T> constructor
PersistState<T> ({})
State persistence setting.
Implementation
PersistState({
required this.key,
this.toJson,
this.fromJson,
this.persistOn,
this.throttleDelay,
this.catchPersistError = false,
this.debugPrintOperations = false,
this.persistStateProvider,
this.shouldRecreateTheState,
}) {
assert(T != dynamic && !isObjectOrNull<T>());
fromJson ??= _getFromJsonOfPrimitive<T>();
toJson ??= _getToJsonOfPrimitive<T>();
}