isOkAnd method

Future<bool> isOkAnd(
  1. FutureOr<bool> fn(
    1. S
    )
)

Implementation

Future<bool> isOkAnd(FutureOr<bool> Function(S) fn) {
  return then((result) {
    if (result.isOk()) {
      return fn(result.unwrap());
    } else {
      return false;
    }
  });
}