0

I have a disabled TextField in Flutter, I want to color the text as if it was enabled.

TextField(
  controller: _controller,
  enabled: false,
  style: const TextStyle(fontSize: 20),
)

enter image description here Desired

enter image description here Actual

Any idea?

marcolav
  • 405
  • 1
  • 6
  • 17
  • https://stackoverflow.com/a/72292112/5882307 – OMi Shah Jul 16 '23 at 15:56
  • https://stackoverflow.com/questions/57035045/how-can-i-theme-the-color-the-disabled-text-form-fields-label-in-flutter – Stellar Creed Jul 16 '23 at 16:02
  • Setting disabledColor in ThemeData didn't help, while in the first link I found readOnly option which did what I wanted. Also onTap was useful. Thanks to the both of you, I had not found these links – marcolav Jul 16 '23 at 17:11

0 Answers0