onPressed property
final
The callback triggered when the icon is pressed and the state changes between expanded and collapsed. The value passed to the current state.
If this is set to null, the button will be disabled.
Implementation
final ValueChanged<bool>? onPressed;