I would like to have a different fillColor
for the TextField
when it is in the focused state and a different one in the normal state. How to achieve this kind of behavior?
Similarly, is it possible to customize other styles as well based on the state of the TextField
?
Edit:
I was aiming for a color transition something in lines of this for mobile with flutter.
You can pass your own
FocusNode
object to your text field'sfocusNode
attribute.FocusNode
hasaddListener
method in which you can callsetState
and thus re-render your widget.