onPressed property
dynamic Function()?
onPressed
final
onPressed expects a function that will be executed on button press.
if value is null
it will not be clickable,
but disabled design will not be applied.
To apply disabled design use isEnabled attribute
Implementation
final Function()? onPressed;