when<W> method
Return the result in one of these functions.
if the result is an error, it will be returned in
whenError
,
if it is a success it will be returned in whenSuccess
.
Implementation
@override
W when<W>(
W Function(S succcess) whenSuccess,
W Function(E error) whenError,
) {
return whenError(_error);
}