enabled property

bool enabled

Whether the button is enabled or disabled.

Buttons are disabled by default. To enable a button, set its onPressed, onLongPress, onTapDown or onTapUp properties to a non-null value.

Implementation

bool get enabled =>
    onPressed != null ||
    onLongPress != null ||
    onTapDown != null ||
    onTapUp != null;