showSnackBar function

void showSnackBar(
  1. BuildContext context,
  2. String text
)

helper function to display snack bar message

Implementation

void showSnackBar(BuildContext context, String text){
  ScaffoldMessenger.of(context).showSnackBar(SnackBar(content: Text(text)));
}