match<W> method

Future<W> match<W>({
  1. required FutureOr<W> ok(
    1. S
    ),
  2. required FutureOr<W> err(
    1. F
    ),
})

Implementation

Future<W> match<W>(
    {required FutureOr<W> Function(S) ok,
    required FutureOr<W> Function(F) err}) {
  return then<W>((result) => result.match(ok: ok, err: err));
}