onExpansionChanged property
Callback invoked when the expansion state should change.
When provided, the collapsible operates in controlled mode and the parent widget is responsible for managing the expansion state. Called with the current expansion state when the user triggers a state change.
Implementation
final ValueChanged<bool>? onExpansionChanged;