updateWith method

Stream<AsyncActionResult> updateWith(
  1. Future<ActionResult> future
)

Update self with future ActionResult

Implementation

Stream<AsyncActionResult> updateWith(Future<ActionResult> future) async* {
  ensureNoParallelRun();

  yield AsyncActionResult.waiting();

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