closeCurrentSnackbar method
Closes the currently visible snackbar, if any.
When withAnimations is false, the snackbar is removed immediately,
skipping its exit animation.
Implementation
Future<void> closeCurrentSnackbar({bool withAnimations = true}) async {
await SnackbarController.closeCurrentSnackbar(
withAnimations: withAnimations,
);
}