AiChatConfig class

Configuration class for customizing the AI chat interface.

@Deprecated: This class is being phased out in favor of direct parameters in AiChatWidget. For new code, pass configuration options directly to AiChatWidget constructor.

Annotations
  • @Deprecated('Use direct parameters in AiChatWidget instead. This class will be removed in a future version.')

Constructors

AiChatConfig({String userName = 'User', String aiName = 'AI', String? hintText, double? maxWidth, EdgeInsets? padding, bool enableAnimation = true, bool showTimestamp = true, bool readOnly = false, bool persistentExampleQuestions = false, bool enableMarkdownStreaming = true, List<ExampleQuestion> exampleQuestions = const [], Duration streamingDuration = const Duration(milliseconds: 30), InputOptions? inputOptions, MessageOptions? messageOptions, MessageListOptions? messageListOptions, QuickReplyOptions? quickReplyOptions, ScrollToBottomOptions? scrollToBottomOptions, WelcomeMessageConfig? welcomeMessageConfig, LoadingConfig loadingConfig = const LoadingConfig(), PaginationConfig paginationConfig = const PaginationConfig(), List<ChatUser>? typingUsers, ScrollBehaviorConfig? scrollBehaviorConfig})
const

Properties

aiName String
The name of the AI assistant in the chat interface.
final
enableAnimation bool
Whether to enable message animations. Defaults to true.
final
enableMarkdownStreaming bool
Whether to enable markdown streaming animations.
final
exampleQuestions List<ExampleQuestion>
List of example questions to show in the welcome message.
final
hashCode int
The hash code for this object.
no setterinherited
hintText String?
Placeholder text for the input field.
final
inputOptions InputOptions?
Custom options for the input field.
final
loadingConfig LoadingConfig
Configuration for loading states
final
maxWidth double?
Maximum width of the chat interface. If null, takes full width.
final
messageListOptions MessageListOptions?
Custom options for the message list.
final
messageOptions MessageOptions?
Custom options for message display.
final
padding EdgeInsets?
Padding around the chat interface.
final
paginationConfig PaginationConfig
Configuration for pagination
final
persistentExampleQuestions bool
Whether to show example questions persistently, even after welcome message disappears.
final
quickReplyOptions QuickReplyOptions?
Custom options for quick replies.
final
readOnly bool
Whether the chat is in read-only mode. Defaults to false.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollBehaviorConfig ScrollBehaviorConfig?
Configuration for scroll behavior
final
scrollToBottomOptions ScrollToBottomOptions?
Custom options for the scroll-to-bottom button.
final
showTimestamp bool
Whether to show message timestamps. Defaults to true.
final
streamingDuration Duration
Duration for streaming animations.
final
typingUsers List<ChatUser>?
List of users currently typing.
final
userName String
The name of the user in the chat interface.
final
welcomeMessageConfig WelcomeMessageConfig?
Configuration for the welcome message section
final

Methods

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
Creates a copy of this config with the given fields replaced with new values
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited