AgentDisclosurePolicy class

When a collapsible Agent surface opens and closes on its own.

The work behind the surface moves through AgentWorkPhases. Entering AgentWorkPhase.working opens the surface, settling closes it, and a failure leaves it as it is, so output that explains the failure stays in view. Once the reader toggles the surface within a run, the run never overrides that choice; the next run starts fresh.

The policy decides; AgentDisclosureController applies it to an open state that the host or the widget owns.

Annotations

Constructors

AgentDisclosurePolicy({bool openWhileWorking = true, bool collapseWhenSettled = true, bool keepOpenOnFailure = true, bool respectReaderToggle = true})
Creates a disclosure policy.
const

Properties

collapseWhenSettled → bool
Whether settling (AgentWorkPhase.settled) closes the surface.
final
hashCode → int
The hash code for this object.
no setteroverride
keepOpenOnFailure → bool
Whether a failure (AgentWorkPhase.failed) leaves the surface as it is.
final
openWhileWorking → bool
Whether entering AgentWorkPhase.working opens the surface.
final
respectReaderToggle → bool
Whether a reader's toggle within a run suppresses the run's own requests.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
request(AgentWorkPhase from, AgentWorkPhase to) → bool?
The open state the work asks for when it moves from from to to, or null when it asks for nothing.
toString() → String
A string representation of this object.
inherited

Operators

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