ChatTheme class

Theme configuration for the chat widget

Constructors

ChatTheme.new({Color? userBubbleColor, Color? botBubbleColor, TextStyle? userTextStyle, TextStyle? botTextStyle, BoxDecoration? userBubbleDecoration, BoxDecoration? botBubbleDecoration, InputDecoration? inputDecoration, Color? sendButtonColor, Color? sendButtonDisabledColor, Color? loadingIndicatorColor, Color? backgroundColor, BorderRadius? userBubbleBorderRadius, BorderRadius? botBubbleBorderRadius})
const
ChatTheme.fromTheme(ThemeData theme)
Creates a ChatTheme from a Flutter ThemeData This allows the chat widget to adopt the app's theme
factory

Properties

backgroundColor Color?
Background color of the chat area
final
botBubbleBorderRadius BorderRadius?
Border radius for bot message bubbles
final
botBubbleColor Color?
Color of bot message bubbles
final
botBubbleDecoration BoxDecoration?
Decoration for bot message bubbles
final
botTextStyle TextStyle?
Text style for bot messages
final
hashCode int
The hash code for this object.
no setterinherited
inputDecoration InputDecoration?
Input field decoration
final
loadingIndicatorColor Color?
Loading indicator color
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sendButtonColor Color?
Send button color when active
final
sendButtonDisabledColor Color?
Send button color when disabled
final
userBubbleBorderRadius BorderRadius?
Border radius for user message bubbles
final
userBubbleColor Color?
Color of user message bubbles
final
userBubbleDecoration BoxDecoration?
Decoration for user message bubbles
final
userTextStyle TextStyle?
Text style for user messages
final

Methods

getBotBubbleDecoration(ThemeData appTheme) BoxDecoration
Apply theme with implicit fallbacks to default theme and app theme
getBotTextStyle(ThemeData appTheme) TextStyle
Get text style for bot messages with fallbacks
getUserBubbleDecoration(ThemeData appTheme) BoxDecoration
Apply theme with implicit fallbacks to default theme and app theme
getUserTextStyle(ThemeData appTheme) TextStyle
Get text style for user messages with fallbacks
merge(ChatTheme? other) ChatTheme
Merges this theme with another, preferring values from the other theme when they exist
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