onPressed property

void Function()? onPressed
final

The callback function triggered when the button is pressed. If left null, the button will not respond to user interaction.

Implementation

final void Function()? onPressed;