showSnackBar function

dynamic showSnackBar(
  1. BuildContext context,
  2. dynamic text
)

snackBar

Implementation

showSnackBar(BuildContext context, text){
  if(text is String){
    Scaffold.of(context).showSnackBar(SnackBar(content: Text("$text")));
  }else if(text is Widget){
    Scaffold.of(context).showSnackBar(SnackBar(content: text));
  }
}