copyWith method
ChatbotConfig
copyWith({
- Widget? chatWidget,
- ChatbotPosition? position,
- IconData? icon,
- IconData? closeIcon,
- Color? iconColor,
- Color? backgroundColor,
- double? buttonSize,
- double? iconSize,
- double? windowWidth,
- double? windowHeight,
- double? margin,
- double? elevation,
- double? windowBorderRadius,
- String? tooltip,
- Color? windowBackgroundColor,
- Color? windowBorderColor,
- double? windowBorderWidth,
- double? windowElevation,
- bool? showBadge,
- Color? badgeColor,
- VoidCallback? onOpen,
- VoidCallback? onClose,
Cria uma cópia desta configuração com os valores especificados alterados.
Implementation
ChatbotConfig copyWith({
Widget? chatWidget,
ChatbotPosition? position,
IconData? icon,
IconData? closeIcon,
Color? iconColor,
Color? backgroundColor,
double? buttonSize,
double? iconSize,
double? windowWidth,
double? windowHeight,
double? margin,
double? elevation,
double? windowBorderRadius,
String? tooltip,
Color? windowBackgroundColor,
Color? windowBorderColor,
double? windowBorderWidth,
double? windowElevation,
bool? showBadge,
Color? badgeColor,
VoidCallback? onOpen,
VoidCallback? onClose,
}) {
return ChatbotConfig(
chatWidget: chatWidget ?? this.chatWidget,
position: position ?? this.position,
icon: icon ?? this.icon,
closeIcon: closeIcon ?? this.closeIcon,
iconColor: iconColor ?? this.iconColor,
backgroundColor: backgroundColor ?? this.backgroundColor,
buttonSize: buttonSize ?? this.buttonSize,
iconSize: iconSize ?? this.iconSize,
windowWidth: windowWidth ?? this.windowWidth,
windowHeight: windowHeight ?? this.windowHeight,
margin: margin ?? this.margin,
elevation: elevation ?? this.elevation,
windowBorderRadius: windowBorderRadius ?? this.windowBorderRadius,
tooltip: tooltip ?? this.tooltip,
windowBackgroundColor:
windowBackgroundColor ?? this.windowBackgroundColor,
windowBorderColor: windowBorderColor ?? this.windowBorderColor,
windowBorderWidth: windowBorderWidth ?? this.windowBorderWidth,
windowElevation: windowElevation ?? this.windowElevation,
showBadge: showBadge ?? this.showBadge,
badgeColor: badgeColor ?? this.badgeColor,
onOpen: onOpen ?? this.onOpen,
onClose: onClose ?? this.onClose,
);
}