NewToast function

void NewToast(
  1. BuildContext context, {
  2. int seconds = 2,
  3. bool crossPage = true,
  4. bool clickClose = false,
  5. bool ignoreContentClick = false,
  6. bool onlyOne = true,
  7. int backgroundColor = 0x00000000,
  8. int animationMilliseconds = 200,
  9. int animationReverseMilliseconds = 200,
  10. BackButtonBehavior backButtonBehavior = BackButtonBehavior.none,
})

Implementation

void NewToast(
  BuildContext context, {
  int seconds = 2,
  bool crossPage = true,
  bool clickClose = false,
  bool ignoreContentClick = false,
  bool onlyOne = true,
  int backgroundColor = 0x00000000,
  int animationMilliseconds = 200,
  int animationReverseMilliseconds = 200,
  BackButtonBehavior backButtonBehavior = BackButtonBehavior.none,
}) {
  BotToast.showCustomText(
    duration: Duration(seconds: seconds),
    onlyOne: onlyOne,
    clickClose: clickClose,
    crossPage: crossPage,
    ignoreContentClick: ignoreContentClick,
    backgroundColor: Color(backgroundColor),
    backButtonBehavior: backButtonBehavior,
    animationDuration: Duration(milliseconds: animationMilliseconds),
    animationReverseDuration:
        Duration(milliseconds: animationReverseMilliseconds),
    toastBuilder: (_) => Align(
      alignment: const Alignment(0, 0.8),
      child: NewView(),
    ),
  );
}