closeAllBottomSheets method

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

Closes all open bottom sheets.

Parameters:

  • id: The key associated with the delegate to use for closing bottom sheets. If null, the root delegate will be used.

Implementation

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