ComToastConfig constructor

const ComToastConfig({
  1. ComToastType type = ComToastType.normal,
  2. ComToastPresentation presentation = ComToastPresentation.toast,
  3. ComToastPosition position = ComToastPosition.center,
  4. Duration duration = const Duration(milliseconds: 1500),
  5. Color? backgroundColor,
  6. Color? textColor,
  7. double fontSize = 14.0,
  8. EdgeInsets padding = const EdgeInsets.symmetric(horizontal: 16.0, vertical: 12.0),
  9. double borderRadius = 12.0,
  10. double maxWidth = 0.85,
  11. int animationDuration = 300,
  12. bool clickThrough = true,
  13. bool showShadow = true,
  14. Color shadowColor = const Color(0x1A000000),
  15. Offset shadowOffset = const Offset(0, 4),
  16. double shadowBlurRadius = 8.0,
  17. IconData? icon,
  18. Widget? iconWidget,
  19. double iconSize = 20.0,
  20. Color? iconColor,
  21. double iconSpacing = 8.0,
  22. Widget builder(
    1. BuildContext context
    )?,
  23. VoidCallback? onTap,
  24. bool showCloseButton = false,
  25. double topMargin = 12.0,
  26. double bottomMargin = 100.0,
})

Implementation

const ComToastConfig({
  this.type = ComToastType.normal,
  this.presentation = ComToastPresentation.toast,
  this.position = ComToastPosition.center,
  this.duration = const Duration(milliseconds: 1500),
  this.backgroundColor,
  this.textColor,
  this.fontSize = 14.0,
  this.padding = const EdgeInsets.symmetric(horizontal: 16.0, vertical: 12.0),
  this.borderRadius = 12.0,
  this.maxWidth = 0.85,
  this.animationDuration = 300,
  this.clickThrough = true,
  this.showShadow = true,
  this.shadowColor = const Color(0x1A000000),
  this.shadowOffset = const Offset(0, 4),
  this.shadowBlurRadius = 8.0,
  this.icon,
  this.iconWidget,
  this.iconSize = 20.0,
  this.iconColor,
  this.iconSpacing = 8.0,
  this.builder,
  this.onTap,
  this.showCloseButton = false,
  this.topMargin = 12.0,
  this.bottomMargin = 100.0,
});