How to change the colour of line below TextField ,whenever a wrong input is made in Flutter?

507

Same can done with - decoration: InputDecoration

TextField(
              decoration: InputDecoration(
                errorStyle: TextStyle(fontSize: 20.0,color: Colors.orange),
                focusedErrorBorder: OutlineInputBorder(borderSide: BorderSide(color: 
                Colors.orange)),
         )
Share:
507
Ravi
Author by

Ravi

Updated on December 08, 2022

Comments

  • Ravi
    Ravi over 1 year

    I want to change the color of the text input filed when a wrong value is entered, e.g an invalid email is entered then the TextField will become red and the line below text field also becomes red, I want to make it orange.

  • Nicolai Henriksen
    Nicolai Henriksen over 5 years
    This is an iOS answer and a Flutter answer is requested.