VoicebotTheme class final
Theme for the prebuilt UI kit (VoiceButton, ChatPanel, VoicebotLauncher).
Ships sensible defaults; override any field to restyle. The kit is fully
replaceable — a merchant can ignore it entirely and build a custom UI on
the headless VoicebotSession streams. Pass via the widgets' theme: param,
or wrap a subtree in VoicebotThemeProvider to set it once.
Colors default to null and resolve against the ambient Material
ColorScheme at build time, so the kit blends with the host app unless you
pin explicit colors.
- Annotations
Constructors
- VoicebotTheme({VoicebotCorner corner = VoicebotCorner.bottomRight, EdgeInsets margin = const EdgeInsets.all(16), double buttonSize = 60, double buttonElevation = 6, IconData? buttonIcon, Color? buttonBackground, Color? buttonForeground, Color? accent, Color? pulseColor, Color? panelBackground, double panelRadius = 20, double panelMaxWidth = 420, double panelHeightFactor = 0.72, Color? userBubbleColor, Color? userTextColor, Color? botBubbleColor, Color? botTextColor, double bubbleRadius = 16, double spacing = 8, TextStyle? titleStyle, TextStyle? bubbleTextStyle, VoicebotLabels labels = const VoicebotLabels()})
-
const
Properties
- accent → Color?
-
Accent used for the bot-speaking state + send button; defaults to
colorScheme.secondary.final - botBubbleColor → Color?
-
Bot bubble fill; defaults to
colorScheme.surfaceContainerHighest.final - botTextColor → Color?
-
Bot bubble text; defaults to
colorScheme.onSurface.final - bubbleRadius → double
-
Bubble corner radius.
final
- bubbleTextStyle → TextStyle?
-
Bubble text style; defaults to
textTheme.bodyMedium.final -
Launcher background; defaults to
colorScheme.primary.final -
Material elevation of the launcher.
final
-
Launcher icon color; defaults to
colorScheme.onPrimary.final -
Idle icon override (defaults to a mic / close glyph by state).
final
-
Diameter of the circular launcher.
final
- corner → VoicebotCorner
-
Corner the floating button anchors to.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- labels → VoicebotLabels
-
Localizable labels (see VoicebotLabels).
final
- margin → EdgeInsets
-
Margin from the anchored corner (respects safe area on top).
final
- panelBackground → Color?
-
Panel surface; defaults to
colorScheme.surface.final - panelHeightFactor → double
-
Panel height as a fraction of available height (clamped 0.4–0.95).
final
- panelMaxWidth → double
-
Max panel width (it shrinks to the screen on small devices).
final
- panelRadius → double
-
Panel corner radius.
final
- pulseColor → Color?
-
Pulse-ring color while listening; defaults to buttonBackground.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- spacing → double
-
Base spacing unit used across the kit.
final
- titleStyle → TextStyle?
-
Header title style; defaults to
textTheme.titleMedium.final - userBubbleColor → Color?
-
User bubble fill; defaults to
colorScheme.primaryContainer.final - userTextColor → Color?
-
User bubble text; defaults to
colorScheme.onPrimaryContainer.final
Methods
-
copyWith(
{VoicebotCorner? corner, EdgeInsets? margin, double? buttonSize, double? buttonElevation, IconData? buttonIcon, Color? buttonBackground, Color? buttonForeground, Color? accent, Color? pulseColor, Color? panelBackground, double? panelRadius, double? panelMaxWidth, double? panelHeightFactor, Color? userBubbleColor, Color? userTextColor, Color? botBubbleColor, Color? botTextColor, double? bubbleRadius, double? spacing, TextStyle? titleStyle, TextStyle? bubbleTextStyle, VoicebotLabels? labels}) → VoicebotTheme -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolve(
BuildContext context) → VoicebotResolvedTheme - Resolves colors/typography against the ambient theme, so the kit blends with the host app unless explicit colors were pinned.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited