closeAllDialogsAndBottomSheets method
Implementation
void closeAllDialogsAndBottomSheets(String? id) {
// It can not be divided, because dialogs and bottomsheets can not be consecutive
var topRoute = _topRoute(id: id);
while (_isDialogRoute(topRoute) || _isBottomSheetRoute(topRoute)) {
_popOverlayRoute(topRoute!, id: id, result: null);
topRoute = _topRoute(id: id);
}
}