whenError method
Applies map when this snapshot hasError.
Implementation
AsyncSnapshot<T> whenError(
Object Function(Object error) map,
) {
if (hasError) {
return AsyncSnapshot.withError(connectionState, map(error!), stackTrace!);
}
return this;
}