copyToHasError method
Copy the state to a new state in the error status
Implementation
SnapState<T> copyToHasError(
dynamic error, {
StackTrace? stackTrace,
VoidCallback? refresher,
}) {
return copyWith(
status: StateStatus.hasError,
error: SnapError(
error: error,
stackTrace: stackTrace,
refresher: refresher ?? () {},
),
infoMessage: '',
);
}