showSnackBar static method
void
showSnackBar(})
Implementation
static void showSnackBar(BuildContext context, String message,
{
/// margin from bottom of navbar defaults to [kNavbarHeight]
double? bottom,
String? actionLabel,
bool showCloseIcon = true,
Duration duration = const Duration(seconds: 3),
Function? onActionPressed,
Function? onClosed}) {
_showMessage(
context,
message,
showCloseIcon: showCloseIcon,
actionLabel: actionLabel,
bottom: bottom ?? kNavbarHeight,
duration: duration,
onPressed: () {
if (onActionPressed != null) {
onActionPressed();
}
},
onClosed: () {
if (onClosed != null) {
onClosed();
}
},
);
}