show<T> static method
Future<T?>
show<T>(
- BuildContext context,
- 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,
Emit a message for the specified duration.
Implementation
static Future<T?> show<T>(
BuildContext context,
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 context.findAncestorStateOfType<_ToastState>()!.show(
ToastMessage(
child: 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);
}