ComToastConfig constructor

const ComToastConfig({
  1. ComToastType type = ComToastType.normal,
  2. ComToastPosition position = ComToastPosition.center,
  3. int duration = 2000,
  4. Color? backgroundColor,
  5. Color? textColor,
  6. double fontSize = 14.0,
  7. EdgeInsets padding = const EdgeInsets.symmetric(horizontal: 16.0, vertical: 12.0),
  8. double borderRadius = 12.0,
  9. double maxWidth = 0.85,
  10. int animationDuration = 300,
  11. bool clickThrough = true,
  12. bool showShadow = true,
  13. Color shadowColor = const Color(0x1A000000),
  14. Offset shadowOffset = const Offset(0, 2),
  15. double shadowBlurRadius = 8.0,
  16. IconData? icon,
  17. double iconSize = 20.0,
  18. Color? iconColor,
  19. double iconSpacing = 8.0,
  20. Widget builder(
    1. BuildContext context
    )?,
})

Implementation

const ComToastConfig({
  this.type = ComToastType.normal,
  this.position = ComToastPosition.center,
  this.duration = 2000,
  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, 2),
  this.shadowBlurRadius = 8.0,
  this.icon,
  this.iconSize = 20.0,
  this.iconColor,
  this.iconSpacing = 8.0,
  this.builder,
}) : assert(duration >= -1,
          'Duration must be >= -1 (where -1 means persistent)');