showAndroidToast function

Future<void> showAndroidToast(
  1. {required Widget child,
  2. required BuildContext context,
  3. Color? backgroundColor,
  4. Duration? duration,
  5. Duration? animationDuration,
  6. VoidCallback? onDismiss,
  7. AlignmentGeometry? alignment,
  8. EdgeInsets? padding,
  9. EdgeInsets? margin,
  10. ToastAnimationBuilder? animationBuilder}

Shows an AndroidToast.

child must not be null. It is usually a text widget.

context must not be null.


Future<void> showAndroidToast({
  required Widget child,
  required BuildContext context,
  Color? backgroundColor,
  Duration? duration,
  Duration? animationDuration,
  VoidCallback? onDismiss,
  AlignmentGeometry? alignment,
  EdgeInsets? padding,
  EdgeInsets? margin,
  ToastAnimationBuilder? animationBuilder,
}) {
  return showToast(
    child: child is AndroidToast
        ? child
        : AndroidToast(
            text: child,
            backgroundColor: backgroundColor,
    context: context,
    duration: duration,
    animationDuration: animationDuration,
    alignment: alignment,
    padding: padding,
    animationBuilder: animationBuilder,