closeAllDialogsAndBottomSheets method
Closes all open dialogs and bottom sheets.
Parameters:
id
: The key associated with the delegate to use for closing overlays. If null, the root delegate will be used.
Implementation
void closeAllDialogsAndBottomSheets(String? id) {
// It can not be divided, because dialogs and bottomsheets can not be consecutive
while (isDialogOpen! && isBottomSheetOpen!) {
closeOverlay(id: id);
}
}