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