copyWith method

AiChatConfig copyWith({
  1. String? userName,
  2. String? aiName,
  3. String? hintText,
  4. double? maxWidth,
  5. EdgeInsets? padding,
  6. bool? enableAnimation,
  7. bool? showTimestamp,
  8. bool? readOnly,
  9. List<ExampleQuestion>? exampleQuestions,
  10. bool? persistentExampleQuestions,
  11. WelcomeMessageConfig? welcomeMessageConfig,
  12. InputOptions? inputOptions,
  13. MessageOptions? messageOptions,
  14. MessageListOptions? messageListOptions,
  15. QuickReplyOptions? quickReplyOptions,
  16. ScrollToBottomOptions? scrollToBottomOptions,
  17. bool? enableMarkdownStreaming,
  18. Duration? streamingDuration,
  19. PaginationConfig? paginationConfig,
  20. LoadingConfig? loadingConfig,
  21. List<ChatUser>? typingUsers,
  22. ScrollBehaviorConfig? scrollBehaviorConfig,
})

Creates a copy of this config with the given fields replaced with new values

@Deprecated: Use direct parameters in AiChatWidget instead.

Implementation

AiChatConfig copyWith({
  String? userName,
  String? aiName,
  String? hintText,
  double? maxWidth,
  EdgeInsets? padding,
  bool? enableAnimation,
  bool? showTimestamp,
  bool? readOnly,
  List<ExampleQuestion>? exampleQuestions,
  bool? persistentExampleQuestions,
  WelcomeMessageConfig? welcomeMessageConfig,
  InputOptions? inputOptions,
  MessageOptions? messageOptions,
  MessageListOptions? messageListOptions,
  QuickReplyOptions? quickReplyOptions,
  ScrollToBottomOptions? scrollToBottomOptions,
  bool? enableMarkdownStreaming,
  Duration? streamingDuration,
  PaginationConfig? paginationConfig,
  LoadingConfig? loadingConfig,
  List<ChatUser>? typingUsers,
  ScrollBehaviorConfig? scrollBehaviorConfig,
}) =>
    AiChatConfig(
      userName: userName ?? this.userName,
      aiName: aiName ?? this.aiName,
      hintText: hintText ?? this.hintText,
      maxWidth: maxWidth ?? this.maxWidth,
      padding: padding ?? this.padding,
      enableAnimation: enableAnimation ?? this.enableAnimation,
      showTimestamp: showTimestamp ?? this.showTimestamp,
      readOnly: readOnly ?? this.readOnly,
      exampleQuestions: exampleQuestions ?? this.exampleQuestions,
      persistentExampleQuestions:
          persistentExampleQuestions ?? this.persistentExampleQuestions,
      welcomeMessageConfig: welcomeMessageConfig ?? this.welcomeMessageConfig,
      inputOptions: inputOptions ?? this.inputOptions,
      messageOptions: messageOptions ?? this.messageOptions,
      messageListOptions: messageListOptions ?? this.messageListOptions,
      quickReplyOptions: quickReplyOptions ?? this.quickReplyOptions,
      scrollToBottomOptions:
          scrollToBottomOptions ?? this.scrollToBottomOptions,
      enableMarkdownStreaming:
          enableMarkdownStreaming ?? this.enableMarkdownStreaming,
      streamingDuration: streamingDuration ?? this.streamingDuration,
      paginationConfig: paginationConfig ?? this.paginationConfig,
      loadingConfig: loadingConfig ?? this.loadingConfig,
      typingUsers: typingUsers ?? this.typingUsers,
      scrollBehaviorConfig: scrollBehaviorConfig ?? this.scrollBehaviorConfig,
    );