messageOk function

dynamic messageOk(
  1. BuildContext context,
  2. String _text
)

Implementation

messageOk(BuildContext context, String _text){
  ScaffoldMessenger.of(context).showSnackBar(SnackBar(
      backgroundColor: aTheme.mainColor,
      duration: Duration(seconds: 5),
      action:  SnackBarAction(
        label: 'Close',
        textColor: Colors.white,
        onPressed: () {
          ScaffoldMessenger.of(context).hideCurrentSnackBar();
        },
      ),
      content: Text(_text,
        style: TextStyle(color: Colors.white), textAlign: TextAlign.center,)));
}