cancelAllSnackbars static method

Future<void> cancelAllSnackbars({
  1. bool withAnimations = true,
})

Closes all snackbars, the one being shown and the queued ones.

When withAnimations is false, the current snackbar is removed immediately, without playing its exit animation.

Implementation

static Future<void> cancelAllSnackbars({bool withAnimations = true}) async {
  await GetRootState.controller.config.snackBarQueue.cancelAllJobs(
    withAnimations: withAnimations,
  );
}