either method

Future<void> either({
  1. required EitherCallback<L> onLeft,
  2. required EitherCallback<R> onRight,
})

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,
    );