toast function

void toast(
  1. String? value, {
  2. ToastGravity? gravity,
  3. dynamic length = Toast.LENGTH_SHORT,
  4. Color? bgColor,
  5. Color? textColor,
  6. bool print = false,
})

Implementation

void toast(
  String? value, {
  ToastGravity? gravity,
  length = Toast.LENGTH_SHORT,
  Color? bgColor,
  Color? textColor,
  bool print = false,
}) {
  if (value.validate().isEmpty || isLinux) {
    cklog(value);
  } else {
    Fluttertoast.showToast(
      msg: value.validate(),
      gravity: gravity,
      toastLength: length,
      backgroundColor: bgColor,
      textColor: textColor,
    );
    if (print) cklog(value);
  }
}