copyWith method
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 builder(
- 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,
);
}