AgentSteps class

The steps of a run: one line that summarizes them, over a rail that lists them.

The line reads "Thinking…" while the run works, "Waiting for approval · 2 steps" while it waits for the reader and "Thought for 6s · 3 steps" once it settles. While the run works, shimmer wraps the line, except under reduced motion.

The rail opens and closes with the run under policy: it opens while the run works and collapses when it settles. A reader's toggle wins for the rest of the run. Each step resolves stepStyle with its own status; style one with AgentStepStylerStatus.onStatus.

A settled run shows duration, or else the time clock measured. The host starts and stops clock; the line only reads it.

Inheritance

Constructors

AgentSteps({Key? key, required List<AgentStep> steps, AgentRunStatus status = AgentRunStatus.working, Duration? duration, AgentRunClock? clock, AgentDisclosurePolicy policy = const AgentDisclosurePolicy(), bool? expanded, bool? defaultExpanded, ValueChanged<bool>? onExpandedChanged, AgentStepsLabelBuilder? labelBuilder, String stepStatusLabelBuilder(AgentStepStatus status)?, AgentShimmerBuilder? shimmer, AgentGlyphBuilder? glyphBuilder, DisclosureStyler disclosureStyle = const DisclosureStyler.create(), AgentStepStyler stepStyle = const AgentStepStyler.create(), AgentStepsStyler style = const AgentStepsStyler.create(), AgentStepsSpec? styleSpec})
Creates the steps of a run.
const

Properties

clock → AgentRunClock?
Measures a live run; read for a settled run without duration.
final
defaultExpanded → bool?
Whether the rail starts open when uncontrolled; defaults to open while the run has not finished.
final
disclosureStyle → DisclosureStyler
The style of the disclosure behind the line and the rail.
final
duration → Duration?
How long the run worked, for a settled run; wins over clock.
final
expanded → bool?
Whether the rail is open. Null lets the widget own the state.
final
glyphBuilder → AgentGlyphBuilder?
Draws the glyphs; defaults to the nearest AgentGlyphs.
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
labelBuilder → AgentStepsLabelBuilder?
Builds the steps line; defaults to English.
final
onExpandedChanged → ValueChanged<bool>?
Receives every request to open or close the rail.
final
policy → AgentDisclosurePolicy
When the rail opens and closes on its own.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
shimmer → AgentShimmerBuilder?
Wraps the steps line while the run works.
final
status → AgentRunStatus
Whether the run works, waits for the reader or is complete.
final
steps → List<AgentStep>
The steps in order.
final
stepStatusLabelBuilder → String Function(AgentStepStatus status)?
Names a step's status for assistive technology; defaults to English.
final
stepStyle → AgentStepStyler
The style of each step, resolved with the step's status.
final
style → AgentStepsStyler
The style of the line and the rail.
final
styleSpec → AgentStepsSpec?
A resolved spec that bypasses style.
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<AgentSteps>
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

Static Methods

defaultLabel(AgentRunStatus status, int steps, Duration? duration) → String
The default steps line.
defaultStepStatusLabel(AgentStepStatus status) → String
The default name of a step's status.