onPressed property

VoidCallback? onPressed
final

Callback when the user clicks the button If this callback is null, then the button is disabled

Implementation

final VoidCallback? onPressed;