copyWith method

ComToastConfig copyWith({
  1. ComToastType? type,
  2. ComToastPresentation? presentation,
  3. ComToastPosition? position,
  4. Duration? duration,
  5. Color? backgroundColor,
  6. Color? textColor,
  7. double? fontSize,
  8. EdgeInsets? padding,
  9. double? borderRadius,
  10. double? maxWidth,
  11. int? animationDuration,
  12. bool? clickThrough,
  13. bool? showShadow,
  14. Color? shadowColor,
  15. Offset? shadowOffset,
  16. double? shadowBlurRadius,
  17. IconData? icon,
  18. Widget? iconWidget,
  19. double? iconSize,
  20. Color? iconColor,
  21. double? iconSpacing,
  22. Widget builder(
    1. BuildContext context
    )?,
  23. VoidCallback? onTap,
  24. bool? showCloseButton,
  25. double? topMargin,
  26. double? bottomMargin,
})

Implementation

ComToastConfig copyWith({
  ComToastType? type,
  ComToastPresentation? presentation,
  ComToastPosition? position,
  Duration? duration,
  Color? backgroundColor,
  Color? textColor,
  double? fontSize,
  EdgeInsets? padding,
  double? borderRadius,
  double? maxWidth,
  int? animationDuration,
  bool? clickThrough,
  bool? showShadow,
  Color? shadowColor,
  Offset? shadowOffset,
  double? shadowBlurRadius,
  IconData? icon,
  Widget? iconWidget,
  double? iconSize,
  Color? iconColor,
  double? iconSpacing,
  Widget Function(BuildContext context)? builder,
  VoidCallback? onTap,
  bool? showCloseButton,
  double? topMargin,
  double? bottomMargin,
}) {
  return ComToastConfig(
    type: type ?? this.type,
    presentation: presentation ?? this.presentation,
    position: position ?? this.position,
    duration: duration ?? this.duration,
    backgroundColor: backgroundColor ?? this.backgroundColor,
    textColor: textColor ?? this.textColor,
    fontSize: fontSize ?? this.fontSize,
    padding: padding ?? this.padding,
    borderRadius: borderRadius ?? this.borderRadius,
    maxWidth: maxWidth ?? this.maxWidth,
    animationDuration: animationDuration ?? this.animationDuration,
    clickThrough: clickThrough ?? this.clickThrough,
    showShadow: showShadow ?? this.showShadow,
    shadowColor: shadowColor ?? this.shadowColor,
    shadowOffset: shadowOffset ?? this.shadowOffset,
    shadowBlurRadius: shadowBlurRadius ?? this.shadowBlurRadius,
    icon: icon ?? this.icon,
    iconWidget: iconWidget ?? this.iconWidget,
    iconSize: iconSize ?? this.iconSize,
    iconColor: iconColor ?? this.iconColor,
    iconSpacing: iconSpacing ?? this.iconSpacing,
    builder: builder ?? this.builder,
    onTap: onTap ?? this.onTap,
    showCloseButton: showCloseButton ?? this.showCloseButton,
    topMargin: topMargin ?? this.topMargin,
    bottomMargin: bottomMargin ?? this.bottomMargin,
  );
}