AgentDisclosureController constructor

AgentDisclosureController({
  1. AgentWorkPhase phase = AgentWorkPhase.settled,
  2. bool? expanded,
  3. bool defaultExpanded = true,
  4. AgentDisclosurePolicy policy = const AgentDisclosurePolicy(),
  5. ValueChanged<bool>? onExpandedChanged,
})

Creates a disclosure in phase.

A non-null expanded makes it controlled; otherwise it starts at defaultExpanded. Later changes to the default are not read.

Implementation

AgentDisclosureController({
  AgentWorkPhase phase = AgentWorkPhase.settled,
  bool? expanded,
  bool defaultExpanded = true,
  this.policy = const AgentDisclosurePolicy(),
  this.onExpandedChanged,
}) : _phase = phase,
     _controlled = expanded,
     _uncontrolled = expanded ?? defaultExpanded;