closeAllSnackbars method

void closeAllSnackbars({
  1. bool withAnimations = true,
})

Closes all queued snackbars.

When withAnimations is false, the currently visible snackbar is removed immediately, skipping its exit animation.

Implementation

void closeAllSnackbars({bool withAnimations = true}) {
  SnackbarController.cancelAllSnackbars(withAnimations: withAnimations);
}