setExpanded method

void setExpanded(
  1. bool value
)

Sets the expansion state to the specified value.

value should be true for expanded or false for collapsed. Directly assigns to the ValueNotifier, triggering notifications only if the state changes. Useful for syncing with external events or user actions.

Implementation

void setExpanded(bool value) => expanded.value = value;