ChatAppearance class abstract

Tenant-configurable chat-surface colours, mirrored from the backend chat_appearance block on /api/project/config/.

Every field is a hex string (#RRGGBB) and every field is nullable. A null field means "use the SDK's MD3-derived default" — surfaced at render time via ChatColors / ColorScheme. Lets a tenant override just the one colour they care about (e.g. user bubble) and keep everything else at the platform-tasteful baseline.

Mirror of the backend ChatAppearanceSerializer. Field naming matches the JSON shape exactly (camelCase) so the freezed-generated fromJson reads them without rename hints.

Available extensions
Annotations
  • @freezed

Constructors

ChatAppearance({String? surfaceColor, String? botBubbleColor, String? userBubbleColor, String? botTextColor, String? userTextColor})
const
factory
ChatAppearance.fromJson(Map<String, Object?> json)
factory

Properties

botBubbleColor String?
Bot bubble background. Falls back to colorScheme.surface.
no setterinherited
botTextColor String?
Bot bubble text. Falls back to colorScheme.onSurface.
no setterinherited
copyWith → $ChatAppearanceCopyWith<ChatAppearance>
Create a copy of ChatAppearance 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
surfaceColor String?
Chat surface background (#RRGGBB). Falls back to colorScheme.surfaceContainerLow.
no setterinherited
userBubbleColor String?
User bubble background. Falls back to colorScheme.surfaceContainerHigh.
no setterinherited
userTextColor String?
User bubble text. Falls back to colorScheme.onSurface.
no setterinherited

Methods

map<TResult extends Object?>(TResult $default(_ChatAppearance value)) → TResult

Available on ChatAppearance, provided by the ChatAppearancePatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_ChatAppearance value)?) → TResult?

Available on ChatAppearance, provided by the ChatAppearancePatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_ChatAppearance value)?, {required TResult orElse()}) → TResult

Available on ChatAppearance, provided by the ChatAppearancePatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(String? surfaceColor, String? botBubbleColor, String? userBubbleColor, String? botTextColor, String? userTextColor)?, {required TResult orElse()}) → TResult

Available on ChatAppearance, provided by the ChatAppearancePatterns extension

A variant of when that fallback to an orElse callback.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this ChatAppearance to a JSON map.
inherited
toString() String
A string representation of this object.
inherited
when<TResult extends Object?>(TResult $default(String? surfaceColor, String? botBubbleColor, String? userBubbleColor, String? botTextColor, String? userTextColor)) → TResult

Available on ChatAppearance, provided by the ChatAppearancePatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(String? surfaceColor, String? botBubbleColor, String? userBubbleColor, String? botTextColor, String? userTextColor)?) → TResult?

Available on ChatAppearance, provided by the ChatAppearancePatterns extension

A variant of when that fallback to returning null

Operators

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