top_snack_bar library

Enums

DismissType
Represents possible triggers to dismiss the snackbar.
SnackBarPosition
Represents possible vertical position of snackbar.

Functions

showTopSnackBar(OverlayState overlayState, Widget child, {Duration animationDuration = const Duration(milliseconds: 1200), Duration reverseAnimationDuration = const Duration(milliseconds: 550), Duration displayDuration = const Duration(milliseconds: 3000), VoidCallback? onTap, bool persistent = false, ControllerCallback? onAnimationControllerInit, EdgeInsets padding = const EdgeInsets.all(16), Curve curve = Curves.elasticOut, Curve reverseCurve = Curves.linearToEaseOut, SafeAreaValues safeAreaValues = const SafeAreaValues(), DismissType dismissType = DismissType.onTap, SnackBarPosition snackBarPosition = SnackBarPosition.top, List<DismissDirection> dismissDirection = const [DismissDirection.up]}) → void
The overlayState argument is used to add specific overlay state. If you are sure that there is a overlay state in your BuildContext, You can get it Overlay.of(BuildContext) Displays a widget that will be passed to child parameter above the current contents of the app, with transition animation

Typedefs

ControllerCallback = void Function(AnimationController)