custom static method
void
custom({
- required BuildContext context,
- String? title,
- required String message,
- IconData? icon,
- Color? backgroundColor,
- Color? textColor,
- Color? iconColor,
- Duration duration = const Duration(seconds: 4),
- ToastPosition position = ToastPosition.topCenter,
- bool showCloseButton = true,
- EdgeInsetsGeometry margin = const EdgeInsets.all(16),
- double borderRadius = 8.0,
- double? width,
- double? height,
- BoxShadow? shadow,
- double? maxWidth,
Implementation
static void custom({
required BuildContext context,
String? title,
required String message,
IconData? icon,
Color? backgroundColor,
Color? textColor,
Color? iconColor,
Duration duration = const Duration(seconds: 4),
ToastPosition position = ToastPosition.topCenter,
bool showCloseButton = true,
EdgeInsetsGeometry margin = const EdgeInsets.all(16),
double borderRadius = 8.0,
double? width,
double? height,
BoxShadow? shadow,
double? maxWidth,
}) {
ToastManager().show(
context: context,
title: title,
message: message,
icon: icon,
backgroundColor: backgroundColor,
textColor: textColor,
iconColor: iconColor,
duration: duration,
position: position,
showCloseButton: showCloseButton,
margin: margin,
borderRadius: borderRadius,
width: width,
height: height,
type: ToastType.custom,
shadow: shadow,
maxWidth: maxWidth,
);
}