onPressed property
void Function()?
onPressed
getter/setter pair
Callback for what should happen when the button is pressed.
Implementation
void Function()? onPressed;
Callback for what should happen when the button is pressed.
void Function()? onPressed;