updateWith<TR> method

Stream<AsyncQueryResult<TR>> updateWith<TR>(
  1. Future<QueryResult<TR>> future
)

Update self with future QueryResult

Implementation

Stream<AsyncQueryResult<TR>> updateWith<TR>(
    Future<QueryResult<TR>> future) async* {
  ensureNoParallelRun();

  yield AsyncQueryResult.waiting();

  try {
    yield AsyncQueryResult.from(await future);
  } catch (error, stackTrace) {
    yield AsyncQueryResult.failed(error, stackTrace);
  }
}