closeAllBottomSheets method

void closeAllBottomSheets({
  1. String? id,
})

Closes all bottom sheets that are currently open.

id is for when using nested navigation.

Implementation

void closeAllBottomSheets({
  String? id,
}) {
  while ((isBottomSheetOpen!)) {
    searchDelegate(id).navigatorKey.currentState?.pop();
  }
}