copyWith method

ChatbotConfig copyWith({
  1. Widget? chatWidget,
  2. ChatbotPosition? position,
  3. IconData? icon,
  4. IconData? closeIcon,
  5. Color? iconColor,
  6. Color? backgroundColor,
  7. double? buttonSize,
  8. double? iconSize,
  9. double? windowWidth,
  10. double? windowHeight,
  11. double? margin,
  12. double? elevation,
  13. double? windowBorderRadius,
  14. String? tooltip,
  15. Color? windowBackgroundColor,
  16. Color? windowBorderColor,
  17. double? windowBorderWidth,
  18. double? windowElevation,
  19. bool? showBadge,
  20. Color? badgeColor,
  21. VoidCallback? onOpen,
  22. 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,
  );
}