either method
Future Either type result on Callback
if the result is an left
, it will be call in onLeft
,
if it is a right
it will be call in onRight
.
Implementation
Future<void> either({
required EitherCallback<L> onLeft,
required EitherCallback<R> onRight,
}) async =>
(await this).either(
onLeft: onLeft,
onRight: onRight,
);