AgThemeData class

Unified design-token ThemeExtension for the entire Agentivity widget stack.

A single AgThemeData instance covers chat bubbles, streaming, runnable widgets, HIL forms, assistant presence, sidebar shell, and all typography / spacing / icon-size multipliers — replacing the former per-package split (AgUiChatTheme, AgUiAssistantTheme, AgUiFormTheme, AgKitThemeData).

Injection — place it in your ThemeData.extensions:

MaterialApp(theme: AgKitThemes.themeDataFor('Agentivity Light'))
// or, with preferences:
MaterialApp(theme: prefs.themeData)

Reading — in any widget:

final theme = AgThemeData.of(context);
// or
final theme = context.agTheme;

Scale multipliers

Field Default Effect
fontScale 1.0 Multiplies every font-size helper.
spacingScale 1.0 Multiplies every gap helper.

Use the named helpers (textBase, gap8, etc.) instead of raw numbers so every widget automatically respects the user's density preference.

Inheritance
Annotations

Constructors

AgThemeData({Color? bubbleUserColor, Color? bubbleUserTextColor, Color? bubbleAgentColor, Color? bubbleAgentTextColor, Color? bubbleSystemColor, Color? bubbleSystemTextColor, double bubbleRadius = 16.0, double bubblePaddingH = 14.0, double bubblePaddingV = 10.0, TextStyle? bubbleUserTextStyle, TextStyle? bubbleAgentTextStyle, InputDecoration? inputDecoration, Color? sendIconColor, Color? streamingColor, Color? runnableAccentColor, double runnableAvatarRadius = 10.0, Color? hilColor, double hilBorderWidth = 2.0, Color? formCardColor, Color? formApproveColor, Color? formRejectColor, Color? formSubmitColor, TextStyle? formTitleStyle, TextStyle? formDescriptionStyle, TextStyle? formFieldLabelStyle, BorderRadius? formBorderRadius, Color? typingIndicatorColor, Color? onlineColor, Color? offlineColor, double sidebarWidth = 240.0, Color? sidebarColor, double cardRadius = 12.0, String? fontFamily, double fontScale = 1.0, double bodyLineHeight = 1.5, double spacingScale = 1.0, double iconSizeSm = 12.0, double iconSizeMd = 15.0})
const

Properties

bodyLineHeight double
Line-height for body text and markdown paragraphs.
final
bubbleAgentColor Color?
final
bubbleAgentTextColor Color?
final
bubbleAgentTextStyle TextStyle?
final
bubblePaddingH double
final
bubblePaddingV double
final
bubbleRadius double
final
bubbleSystemColor Color?
final
bubbleSystemTextColor Color?
final
bubbleUserColor Color?
final
bubbleUserTextColor Color?
final
bubbleUserTextStyle TextStyle?
final
cardRadius double
final
effectiveBubbleAgentTextStyle TextStyle
Agent bubble text style with fontScale applied.
no setter
effectiveBubbleUserTextStyle TextStyle
User bubble text style with fontScale applied.
no setter
effectiveFormDescriptionStyle TextStyle
Form description/body style with fontScale applied (default 14 sp).
no setter
effectiveFormFieldLabelStyle TextStyle
Form field-label style with fontScale applied (default 12 sp w600).
no setter
effectiveFormTitleStyle TextStyle
Form title style with fontScale applied (default 16 sp w600).
no setter
fontFamily String?
final
fontScale double
Font-size multiplier (1.0 = default sizes).
final
formApproveColor Color?
final
formBorderRadius BorderRadius?
final
formCardColor Color?
final
formDescriptionStyle TextStyle?
final
formFieldLabelStyle TextStyle?
final
formRejectColor Color?
final
formSubmitColor Color?
final
formTitleStyle TextStyle?
final
gap10 double
no setter
gap12 double
no setter
gap14 double
no setter
gap16 double
no setter
gap2 double
no setter
gap20 double
no setter
gap24 double
no setter
gap32 double
no setter
gap4 double
no setter
gap48 double
no setter
gap6 double
no setter
gap8 double
no setter
hashCode int
The hash code for this object.
no setterinherited
hilBorderWidth double
final
hilColor Color?
final
iconSizeMd double
Medium card-level icon size (tool-call status, reasoning header).
final
iconSizeSm double
Small inline icon size (clips, badges, timestamps).
final
inputDecoration InputDecoration?
final
offlineColor Color?
final
onlineColor Color?
final
runnableAccentColor Color?
final
runnableAvatarRadius double
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sendIconColor Color?
final
sidebarColor Color?
final
sidebarWidth double
final
spacingScale double
Spacing multiplier (1.0 = default gaps).
final
streamingColor Color?
final
text2xl double
24 px — page headings.
no setter
textBase double
14 px — body / default text.
no setter
textLg double
16 px — subtitles, card titles.
no setter
textSm double
12 px — secondary text, hints.
no setter
textSmPlus double
13 px — slightly larger secondary text, agent name row.
no setter
textXl double
20 px — section headings.
no setter
textXs double
10 px — micro labels, timestamps.
no setter
textXxs double
11 px — secondary labels, captions.
no setter
type Object
The extension's type.
no setterinherited
typingIndicatorColor Color?
final

Methods

copyWith({Color? bubbleUserColor, Color? bubbleUserTextColor, Color? bubbleAgentColor, Color? bubbleAgentTextColor, Color? bubbleSystemColor, Color? bubbleSystemTextColor, double? bubbleRadius, double? bubblePaddingH, double? bubblePaddingV, TextStyle? bubbleUserTextStyle, TextStyle? bubbleAgentTextStyle, InputDecoration? inputDecoration, Color? sendIconColor, Color? streamingColor, Color? runnableAccentColor, double? runnableAvatarRadius, Color? hilColor, double? hilBorderWidth, Color? formCardColor, Color? formApproveColor, Color? formRejectColor, Color? formSubmitColor, TextStyle? formTitleStyle, TextStyle? formDescriptionStyle, TextStyle? formFieldLabelStyle, BorderRadius? formBorderRadius, Color? typingIndicatorColor, Color? onlineColor, Color? offlineColor, double? sidebarWidth, Color? sidebarColor, double? cardRadius, String? fontFamily, double? fontScale, double? bodyLineHeight, double? spacingScale, double? iconSizeSm, double? iconSizeMd}) AgThemeData
Creates a copy of this theme extension with the given fields replaced by the non-null parameter values.
override
fontSize(double base) double
Scales an arbitrary base font size by fontScale.
lerp(covariant AgThemeData? other, double t) AgThemeData
Linearly interpolate with another ThemeExtension object.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
spacing(double base) double
Scales an arbitrary base spacing value by spacingScale.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

of(BuildContext context) AgThemeData
Reads the nearest AgThemeData from context. Returns a default instance if none is registered.