simple static method
void
simple({})
A solid-background floating toast.
textThe message to display.colorBackground color of the toast.textColorColor of the message text.widthWidth of the snackbar. Defaults to 300.durationHow long the toast is visible. Defaults to 1200 ms.
Implementation
static void simple({
required BuildContext context,
required String text,
required Color color,
required Color textColor,
double width = 300,
Duration duration = const Duration(milliseconds: 1200),
}) {
_show(
context,
SnackBar(
clipBehavior: Clip.antiAliasWithSaveLayer,
elevation: 0,
shape: OutlineInputBorder(borderSide: BorderSide(color: color)),
width: width,
behavior: SnackBarBehavior.floating,
duration: duration,
backgroundColor: color,
content: Text(text, style: TextStyle(color: textColor)),
),
);
}