toast method

void toast({
  1. double? fontSize,
  2. ToastGravity? gravity,
  3. Color? backgroundColor,
  4. Color? textColor,
})

Implementation

void toast({
  double? fontSize,
  ToastGravity? gravity,
  Color? backgroundColor,
  Color? textColor,
}) {
  if (isEmpty) {
    return;
  }
  Fluttertoast.showToast(
    msg: this,
    gravity: gravity ?? ToastGravity.CENTER,
    backgroundColor: backgroundColor ?? Colors.black54,
    textColor: textColor ?? Colors.white,
    fontSize: fontSize ?? 16.0,
  );
}