completeWith method

void completeWith(
  1. Object? result
)

Completes dismissed with result if it has not already completed.

Called by the controller when a Dismiss(result: ...) action dismisses this presented screen, so an in-flight present<T> resolves with the action's value instead of null.

Implementation

void completeWith(Object? result) {
  if (!_dismissedCompleter.isCompleted) {
    _dismissedCompleter.complete(result);
  }
}