show static method
void
show({
- required Widget title,
- BuildContext? context,
- OverlayState? overlayState,
- AlignmentGeometry? alignment,
- Duration? autoCloseDuration,
- Duration? animationDuration,
- ToastificationAnimationBuilder? animationBuilder,
- ToastificationType? type,
- ToastificationStyle? style,
- Widget? description,
- Widget? icon,
- Color? primaryColor,
- Color? backgroundColor,
- Color? foregroundColor,
- EdgeInsetsGeometry? padding,
- EdgeInsetsGeometry? margin,
- BorderRadiusGeometry? borderRadius,
- BorderSide? borderSide,
- List<
BoxShadow> ? boxShadow, - TextDirection? direction,
- bool? showProgressBar,
- ProgressIndicatorThemeData? progressBarTheme,
- ToastCloseButton? closeButton,
- bool? closeOnClick,
- bool? dragToClose,
- bool? showIcon,
- DismissDirection? dismissDirection,
- bool? pauseOnHover,
- bool? applyBlurEffect,
- ToastificationCallbacks callbacks = const ToastificationCallbacks(),
- bool? blockBackgroundInteraction,
显示
Implementation
static void show({
required Widget title,
BuildContext? context,
OverlayState? overlayState,
AlignmentGeometry? alignment,
Duration? autoCloseDuration,
Duration? animationDuration,
ToastificationAnimationBuilder? animationBuilder,
ToastificationType? type,
ToastificationStyle? style,
Widget? description,
Widget? icon,
Color? primaryColor,
Color? backgroundColor,
Color? foregroundColor,
EdgeInsetsGeometry? padding,
EdgeInsetsGeometry? margin,
BorderRadiusGeometry? borderRadius,
BorderSide? borderSide,
List<BoxShadow>? boxShadow,
TextDirection? direction,
bool? showProgressBar,
ProgressIndicatorThemeData? progressBarTheme,
ToastCloseButton? closeButton,
bool? closeOnClick,
bool? dragToClose,
bool? showIcon,
DismissDirection? dismissDirection,
bool? pauseOnHover,
bool? applyBlurEffect,
ToastificationCallbacks callbacks = const ToastificationCallbacks(),
bool? blockBackgroundInteraction,
}) {
toastification.show(
context: context,
overlayState: overlayState,
alignment: alignment ?? Alignment.bottomCenter,
autoCloseDuration: autoCloseDuration ?? const Duration(seconds: 3),
animationDuration: animationDuration,
type: type,
style: style ?? ToastificationStyle.flatColored,
title: title,
description: description,
icon: icon,
primaryColor: primaryColor,
backgroundColor: backgroundColor,
foregroundColor: foregroundColor,
padding: padding,
margin: margin,
borderRadius: borderRadius ?? BorderRadius.circular(AppTheme.radius),
borderSide: borderSide,
boxShadow: boxShadow,
direction: direction,
showProgressBar: showProgressBar,
progressBarTheme: progressBarTheme,
closeButton:
closeButton ??
ToastCloseButton(
buttonBuilder: (context, onClose) => Material(
color: Colors.transparent,
child: InkWell(onTap: onClose, child: Icon(CupertinoIcons.clear, size: 20)),
),
),
closeOnClick: closeOnClick,
dragToClose: dragToClose ?? true,
showIcon: showIcon,
dismissDirection: dismissDirection,
pauseOnHover: pauseOnHover ?? true,
applyBlurEffect: applyBlurEffect,
callbacks: callbacks,
// blockBackgroundInteraction: blockBackgroundInteraction,
);
}