closeCurrentSnackbar static method

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

Closes the snackbar currently being shown.

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

Implementation

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