when<W> abstract method
W
when<W>(
- W whenSuccess(
- S success
- W whenError(
- E error
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
W when<W>(
W Function(S success) whenSuccess,
W Function(E error) whenError,
);