show static method

dynamic show(
  1. String text, {
  2. bool long = false,
})

Implementation

static show(String text, {bool long = false}) {
  if (text.length > 0) {
    if (_isFirst) {
      _isFirst = false;
    } else {
      Fluttertoast.cancel();
    }
    Fluttertoast.showToast(
      msg: text,
      toastLength: long ? Toast.LENGTH_LONG : Toast.LENGTH_SHORT,
      gravity: ToastGravity.CENTER,
      backgroundColor: Colors.black87,
      textColor: Colors.white,
      fontSize: 14,
    );
  }
}