ChatTheme class abstract
Defines the visual styling for the chat UI.
Includes color scheme, typography, and shape definitions. Uses Freezed for immutable data classes.
- Available extensions
- Annotations
-
- @Freezed(fromJson: false, toJson: false)
Constructors
- ChatTheme.new({required ChatColors colors, required ChatTypography typography, required BorderRadiusGeometry shape})
-
Creates a ChatTheme instance.
constfactory
- ChatTheme.dark({String? fontFamily})
-
Creates a default dark theme.
Optionally specify a
fontFamily
.factory - ChatTheme.fromThemeData(ThemeData themeData)
-
Creates a ChatTheme based on a Material ThemeData.
Extracts relevant colors and text styles.
factory
- ChatTheme.light({String? fontFamily})
-
Creates a default light theme.
Optionally specify a
fontFamily
.factory
Properties
- colors → ChatColors
-
The color scheme used throughout the chat UI.
no setterinherited
-
copyWith
→ $ChatThemeCopyWith<
ChatTheme> -
Create a copy of ChatTheme
with the given fields replaced by the non-null parameter values.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shape → BorderRadiusGeometry
-
The default border radius for message bubbles only.
no setterinherited
- typography → ChatTypography
-
The text styles used for various elements.
no setterinherited
Methods
-
merge(
ChatTheme? other) → ChatTheme - Merges this theme with another ChatTheme.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
withDarkColors(
{Color? primary, Color? onPrimary, Color? surface, Color? onSurface, Color? surfaceContainer, Color? surfaceContainerLow, Color? surfaceContainerHigh}) → ChatTheme -
Available on ChatTheme, provided by the ChatThemeExtensions extension
Creates a copy of the theme with updated dark colors. -
withLightColors(
{Color? primary, Color? onPrimary, Color? surface, Color? onSurface, Color? surfaceContainer, Color? surfaceContainerLow, Color? surfaceContainerHigh}) → ChatTheme -
Available on ChatTheme, provided by the ChatThemeExtensions extension
Creates a copy of the theme with updated light colors.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited