showNotification static method
void
showNotification({
- ToastBuilder? leading,
- ToastBuilder? title,
- ToastBuilder? subtitle,
- ToastBuilder? trailing,
- WrapAnimation? wrapAnimation,
- WrapAnimation? wrapToastAnimation,
- GestureTapCallback? onTap,
- Color? backgroundColor,
- double? borderRadius,
- GestureLongPressCallback? onLongPress,
- Alignment? align,
- BackButtonBehavior? backButtonBehavior,
- Duration? duration,
- Duration? animationDuration,
- Duration? animationReverseDuration,
- EdgeInsetsGeometry? contentPadding,
- EdgeInsetsGeometry? margin,
- VoidCallback? onClose,
- bool crossPage = true,
- bool onlyOne = true,
- bool enableSlideOff = true,
显示通知
Implementation
static void showNotification({
ToastBuilder? leading,
ToastBuilder? title,
ToastBuilder? subtitle,
ToastBuilder? trailing,
WrapAnimation? wrapAnimation,
WrapAnimation? wrapToastAnimation,
GestureTapCallback? onTap,
Color? backgroundColor,
double? borderRadius,
GestureLongPressCallback? onLongPress,
Alignment? align,
BackButtonBehavior? backButtonBehavior,
Duration? duration,
Duration? animationDuration,
Duration? animationReverseDuration,
EdgeInsetsGeometry? contentPadding,
EdgeInsetsGeometry? margin,
VoidCallback? onClose,
bool crossPage = true,
bool onlyOne = true,
bool enableSlideOff = true,
}) {
BotToast.showNotification(
leading: leading,
title: title,
subtitle: subtitle,
trailing: trailing,
wrapAnimation: wrapAnimation,
wrapToastAnimation: (controller, cancel, Widget child) => CustomAnimationWidget(
controller: controller,
child: child,
),
onTap: onTap,
backgroundColor: backgroundColor,
borderRadius: borderRadius ?? AppTheme.radius,
onLongPress: onLongPress,
align: align ?? const Alignment(0, 0.96),
backButtonBehavior: backButtonBehavior,
duration: duration ?? const Duration(seconds: 4),
animationDuration: animationDuration,
animationReverseDuration: animationReverseDuration,
contentPadding: contentPadding ?? EdgeInsets.symmetric(horizontal: AppTheme.padding),
margin: margin ?? EdgeInsets.symmetric(horizontal: AppTheme.margin),
onClose: onClose,
crossPage: crossPage,
onlyOne: onlyOne,
enableSlideOff: enableSlideOff,
);
}