Material3ChatTheme class final
Material 3 compatible chat theme that integrates with Flutter's ColorScheme and provides semantic color tokens.
This theme automatically adapts to light/dark mode based on the ColorScheme and follows Material 3 design guidelines.
Constructors
- Material3ChatTheme({required ColorScheme colorScheme, TextTheme? textTheme, double messageBorderRadiusValue = 20.0, double textMessagePaddingValue = 12.0, EdgeInsets messageInsetValue = const EdgeInsets.symmetric(vertical: 8)})
-
Creates a Material 3 chat theme from a ColorScheme and optional TextTheme.
const
- Material3ChatTheme.fromContext(BuildContext context, {double? messageBorderRadius, double? textMessagePadding, EdgeInsets? messageInset})
-
Factory constructor to create theme from BuildContext
factory
Properties
- backgroundColor → Color
-
Used as a background color of a chat widget
no setteroverride
- carouselBoxDecoration → BoxDecoration
-
Carousel container decoration
no setteroverride
- carouselButtonStyle → ButtonStyle
-
Button style used on Carousel widget
no setteroverride
- carouselSubtitleTextStyle → TextStyle
-
Subtitle text style used for displaying text on Carousel widget
no setteroverride
- carouselTitleTextStyle → TextStyle
-
Title text style used for displaying text on Carousel widget
no setteroverride
- colorScheme → ColorScheme
-
The Material 3 color scheme used for semantic colors
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- htmlTextColor → Color
-
Color on p, h1, h2, h3, h4, h5 elements.
no setteroverride
- htmlTextFontFamily → String?
-
FontFamily on p, h1, h2, h3, h4, h5 elements.
no setteroverride
- htmlWidgetTextTime → TextStyle
-
no setteroverride
- imageBorderRadius → BorderRadius
-
Image borderRadius
no setteroverride
- imageWidgetTextTime → TextStyle
-
no setteroverride
- incomingChatTextTime → TextStyle
-
no setteroverride
- incomingMessageBodyTextStyle → TextStyle
-
Body text style used for displaying text on different types
of received messages
no setteroverride
- messageBorderRadius → double
-
Border radius of message container
no setteroverride
- messageBorderRadiusValue → double
-
Border radius value for message containers
final
- messageInset → EdgeInsets
-
Message inset, can be used to have padding between messages
no setteroverride
- messageInsetValue → EdgeInsets
-
Inset value for messages
final
- outgoingChatTextTime → TextStyle
-
no setteroverride
- outgoingMessageBodyTextStyle → TextStyle
-
Body text style used for displaying text on different types
of sent messages
no setteroverride
- primaryColor → Color
-
Primary color, used as a background of outgoing messages
no setteroverride
- quickReplyButtonStyle → ButtonStyle
-
Button style used on QuickReply widget
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- secondaryColor → Color
-
Secondary color, used as a background of incoming messages
no setteroverride
- textMessagePadding → double
-
Text padding to it's container
no setteroverride
- textMessagePaddingValue → double
-
Padding value for text messages
final
- textTheme → TextTheme?
-
The text theme for typography scale
final
Methods
-
copyWith(
{ColorScheme? colorScheme, TextTheme? textTheme, double? messageBorderRadius, double? textMessagePadding, EdgeInsets? messageInset}) → Material3ChatTheme - Creates a copy of this theme 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.
override