enabled property

bool get enabled

Whether the button responds to input; true when onPressed is set.

Implementation

bool get enabled => onPressed != null && !isLoading;