showToastCancel static method

dynamic showToastCancel(
  1. BuildContext context,
  2. String message
)

Implementation

static showToastCancel(BuildContext context, String message) {
  flutterToast = FToast();
  flutterToast?.init(context);
  Widget toastWithButton = Container(
    padding: EdgeInsets.only(bottom: Sizes.PADDING_20),
    child: MessageTooltipDialog(
      message: message,
      callBackClose: () => flutterToast?.removeCustomToast(),
    ),
  );
  flutterToast?.showToast(
    child: toastWithButton,
    gravity: ToastGravity.BOTTOM_RIGHT,
    toastDuration: const Duration(seconds: 20),
  );
}