closeAllDialogs<T> method

void closeAllDialogs<T>({
  1. String? id,
  2. T? result,
})

Close all currently open dialogs, returning a result to each of them, if provided

Implementation

void closeAllDialogs<T>({String? id, T? result}) {
  var topRoute = _topRoute(id: id);
  while (_isDialogRoute(topRoute)) {
    _popOverlayRoute(topRoute!, id: id, result: result);
    topRoute = _topRoute(id: id);
  }
}