You can make button disable by setting onPressed property null . If you set onPressed to null Flutter will added disabled related characteristic to button automatically. I have created a switch with a button and when you turn on switch the value of onPressed set to null.
Read more