setToHasError method
void
setToHasError(
- dynamic error, {
- StackTrace? stackTrace,
- VoidCallback? refresher,
- SideEffects<
T> ? sideEffects, - bool shouldOverrideDefaultSideEffects(
- SnapState<
T>
- SnapState<
- StateInterceptor<
T> ? stateInterceptor,
override
Set the state to the error status
Implementation
@override
void setToHasError(
dynamic error, {
StackTrace? stackTrace,
VoidCallback? refresher,
SideEffects<T>? sideEffects,
bool Function(SnapState<T>)? shouldOverrideDefaultSideEffects,
StateInterceptor<T>? stateInterceptor,
}) {
notify(
nextSnap: _snapState._copyToHasError(
SnapError(
error: error,
stackTrace: stackTrace,
refresher: refresher ?? () {},
),
),
sideEffects: sideEffects,
shouldOverrideDefaultSideEffects: shouldOverrideDefaultSideEffects,
stateInterceptor: stateInterceptor,
);
}