custom static method

void custom({
  1. required BuildContext context,
  2. String? title,
  3. required String message,
  4. IconData? icon,
  5. Color? backgroundColor,
  6. Color? textColor,
  7. Color? iconColor,
  8. Duration duration = const Duration(seconds: 4),
  9. ToastPosition position = ToastPosition.topCenter,
  10. bool showCloseButton = true,
  11. EdgeInsetsGeometry margin = const EdgeInsets.all(16),
  12. double borderRadius = 8.0,
  13. double? width,
  14. double? height,
  15. BoxShadow? shadow,
  16. 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,
  );
}