I\'m just starting to get the hang of Flutter, but I\'m having trouble figuring out how to set the enabled state of a button.
From the docs, it says to set onP
onP
Enable and Disable functionality is same for most of the widgets.
Ex, button , switch, checkbox etc.
Just set the onPressed property as shown below
onPressed
onPressed : null returns Disabled widget
onPressed : null
onPressed : (){} or onPressed : _functionName returns Enabled widget
onPressed : (){}
onPressed : _functionName