closeAllBottomSheets<T> method

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

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

Implementation

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