showToast method

void showToast({
  1. required String msg,
  2. int showTime = 2000,
  3. Color? bgColor,
  4. Color? textColor,
  5. double textSize = 14,
  6. VxToastPosition position = VxToastPosition.bottom,
  7. double pdHorizontal = 20,
  8. double pdVertical = 10,
})

Extension method to directly access VxToast with context.

Show toast

Implementation

void showToast({
  required String msg,

  /// show duration in ms
  int showTime = 2000,
  Color? bgColor,
  Color? textColor,
  double textSize = 14,
  VxToastPosition position = VxToastPosition.bottom,
  double pdHorizontal = 20,
  double pdVertical = 10,
}) =>
    VxToast.show(this,
        msg: msg,
        bgColor: bgColor,
        pdHorizontal: pdHorizontal,
        pdVertical: pdVertical,
        position: position,
        showTime: showTime,
        textColor: textColor,
        textSize: textSize);