0
 TextFormField(
                decoration: InputDecoration(
                  hintText: "Name",
                  hintStyle: TextStyle(color: Colors.white),
                  border: OutlineInputBorder(
                    borderSide: BorderSide(color: Colors.teal)
                  ),
                ),
              ),

this make the whole text field I don't want that , only the bottom side

Mo_
  • 45
  • 9

2 Answers2

0

Try using this code:

TextFormField(
            decoration: InputDecoration(
          hintText: "Name",
          hintStyle: TextStyle(color: Colors.white),
          enabledBorder: UnderlineInputBorder(
            borderSide: BorderSide(color: Colors.teal),
          ),
          focusedBorder: UnderlineInputBorder(
            borderSide: BorderSide(color: Colors.teal),
          ),
          border: UnderlineInputBorder(
            borderSide: BorderSide(color: Colors.teal),
          ),
        )),
0
TextFormField(
  decoration: InputDecoration(
    hintText: "Name",
    hintStyle: TextStyle(color: Colors.white),
    //When the TextFormField is NOT on focus
    enabledBorder: UnderlineInputBorder(
      borderSide: BorderSide(color: Colors.black),
    ),
    //When the TextFormField is ON focus
    focusedBorder: UnderlineInputBorder(
      borderSide: BorderSide(color: Colors.teal),
    ),
  ),
)