enabled property
Whether the button is enabled or disabled.
Buttons are disabled by default. To enable a button, set its onPressed or onLongPress properties to a non-null value.
Implementation
bool get enabled => onPressed != null || onLongPress != null;