FutureOr<T> catchError(Function onError, {bool Function(Object error)? test}) { final that = this; if (that is Future<T>) { return that.catchError(onError, test: test); } return that; }