ThinkingOrb class

Dotted thought-orb loading indicator widget for AI and agent UIs.

Features:

  • 9 hand-tuned animated verb states (OrbState.working, OrbState.searching, etc.)
  • 2 tuned size presets: 64px avatar scale and 20px inline text scale
  • Live dark/light theme detection and monochrome depth ink
  • Reduced-motion support (renders a static representative frame at t = 0.6)
  • Shared clock synchronization keeping all on-screen orbs in exact phase
  • Full accessibility Semantics support
Inheritance

Constructors

ThinkingOrb({Key? key, OrbState state = OrbState.working, OrbSize size = OrbSize.px64, OrbTheme theme = OrbTheme.auto, double speed = 1.0, bool paused = false, String? label, Color? color, double? customDimension, double? time})
Creates a ThinkingOrb widget.
const
ThinkingOrb.custom({Key? key, required double dimension, OrbState state = OrbState.working, OrbTheme theme = OrbTheme.auto, double speed = 1.0, bool paused = false, String? label, Color? color, double? time})
Creates a ThinkingOrb with a custom pixel dimension.
const
ThinkingOrb.large({Key? key, OrbState state = OrbState.working, OrbTheme theme = OrbTheme.auto, double speed = 1.0, bool paused = false, String? label, Color? color, double? time})
Creates a large 64px ThinkingOrb (e.g. for chat avatars or hero loading).
const
ThinkingOrb.small({Key? key, OrbState state = OrbState.working, OrbTheme theme = OrbTheme.auto, double speed = 1.0, bool paused = false, String? label, Color? color, double? time})
Creates a small 20px ThinkingOrb (e.g. for inline text or badges).
const

Properties

color → Color?
Optional custom tint color. If omitted, standard monochrome ink is used.
final
customDimension → double?
Optional custom dimension in logical pixels.
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
label → String?
Accessibility label override (defaults to OrbState.label).
final
paused → bool
Freeze animation on the current frame.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
size → OrbSize
The preset size category (64px or 20px).
final
speed → double
Multiplier on top of the preset's baked speed (defaults to 1.0).
final
state → OrbState
Which animation verb to show.
final
theme → OrbTheme
Theme mode (auto detects dark/light from Flutter ThemeData).
final
time → double?
Explicit timestamp in seconds (overrides the global clock when provided).
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<ThinkingOrb>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited

Operators

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