ExpanderController class

A controller that manages the expanded state of an Expander widget.

ExpanderController allows for programmatic control of an Expander's state, enabling toggling and direct setting of the expanded state from outside the widget.

See also:

  • doc/component/expander.md for more detailed documentation
  • Expander, which uses this controller

Constructors

ExpanderController.new({bool initiallyExpanded = false})
Creates an ExpanderController with an optional initial expanded state.

Properties

expanded ValueNotifier<bool>
A notifier that tracks the current expanded state.
final
hashCode int
The hash code for this object.
no setterinherited
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
setExpanded(bool value) → void
Sets the expansion state to the specified value.
toggle() → void
Toggles between expanded and collapsed states.
toString() String
A string representation of this object.
inherited

Operators

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