showToast<T> method

Future<T?> showToast<T>(
  1. Widget child, {
  2. Duration duration = const Duration(seconds: 3),
  3. Color? backgroundColor,
  4. double? elevation,
  5. Color? shadowColor,
  6. Color? surfaceTintColor,
  7. ShapeBorder? shape,
  8. Clip clipBehavior = Clip.none,
  9. AlignmentGeometry? alignment,
  10. EdgeInsets? margin,
  11. EdgeInsets? padding,
  12. Color? iconColor,
  13. TextStyle? textStyle,
  14. bool queue = true,
})

Emit a message for the specified duration.

Implementation

Future<T?> showToast<T>(
  Widget child, {
  Duration duration = const Duration(seconds: 3),
  Color? backgroundColor,
  double? elevation,
  Color? shadowColor,
  Color? surfaceTintColor,
  ShapeBorder? shape,
  Clip clipBehavior = Clip.none,
  AlignmentGeometry? alignment,
  EdgeInsets? margin,
  EdgeInsets? padding,
  Color? iconColor,
  TextStyle? textStyle,
  bool queue = true,
}) {
  return Toast.show(
    this,
    child,
    duration: duration,
    backgroundColor: backgroundColor,
    elevation: elevation,
    shadowColor: shadowColor,
    surfaceTintColor: surfaceTintColor,
    shape: shape,
    clipBehavior: clipBehavior,
    alignment: alignment,
    margin: margin,
    padding: padding,
    iconColor: iconColor,
    textStyle: textStyle,
    queue: queue,
  );
}