toast static method

dynamic toast({
  1. dynamic message,
  2. dynamic backgroundColor,
  3. dynamic textColor,
  4. dynamic fontSize,
})

Implementation

static   toast({message, backgroundColor, textColor, fontSize}) {
   return ScaffoldMessenger.of(Get.context!).showSnackBar(SnackBar(
     behavior: SnackBarBehavior.floating,
     duration: const Duration(seconds: 2),
     margin: EdgeInsets.symmetric(
         vertical: Platform.isAndroid ? height_40 : height_40,
         horizontal: margin_30),
     content: commonText(message, color: CommonColors.white, fontSize: font_13),
   ));
 }