onPressed property
Callback invoked when the button is pressed.
The primary interaction callback for the button. When null, the button becomes disabled unless enabled is explicitly set to true. The button automatically handles loading states, disabled states, and provides haptic feedback.
Implementation
final VoidCallback? onPressed;