copyWith method

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

Implementation

ComToastConfig copyWith({
  ComToastType? type,
  ComToastPosition? position,
  int? 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,
  double? iconSize,
  Color? iconColor,
  double? iconSpacing,
  Widget Function(BuildContext context)? builder,
}) {
  return ComToastConfig(
    type: type ?? this.type,
    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,
    iconSize: iconSize ?? this.iconSize,
    iconColor: iconColor ?? this.iconColor,
    iconSpacing: iconSpacing ?? this.iconSpacing,
    builder: builder ?? this.builder,
  );
}