I need to disable TextFormField occasionally. I couldn\'t find a flag in the widget, or the controller to simply make it read only or disable.
What is the best way to do it?
TextField and TextFormField both have an argument called enabled. You can control it using a boolean variable. enabled=true means it will act as an editing text field whereas enabled=false will disable the TextField.