showSnackBar function

void showSnackBar(
  1. BuildContext context,
  2. String message, {
  3. Duration duration = defaultSnackBarDuration,
})

Implementation

void showSnackBar(BuildContext context, String message,
    {Duration duration = defaultSnackBarDuration}) {
  ScaffoldMessenger.of(context).showSnackBar(SnackBar(content: Text(message), duration: duration));
}