onPressed property

VoidCallback? onPressed
final

Callback invoked when the button is pressed.

Called when the user taps or clicks the button. If null, the button is disabled and does not respond to interactions.

Implementation

final VoidCallback? onPressed;