Search code examples
flutterdarttextflutter-animationflutter-text

Flutter: OutlineInputBorder input border text color


I was trying to build a border for my text field like:

TextFormField(
    style: TextStyle(
    color: Colors.black,
    fontSize: 16,
    ),
    decoration: InputDecoration(
        border: OutlineInputBorder(),
        labelText: 'username',
        hintStyle: TextStyle(
            color: Color(0xFF262AAA),
        ),
        fillColor: Color(0xFF262AAA),
        focusedBorder:OutlineInputBorder(
            borderSide: const BorderSide(color: Color(0xFF262AAA), width: 2.0),
            borderRadius: BorderRadius.circular(25.0),
        ),
    ),
),

it's working for border color but the border text color is can't change. https://prnt.sc/112fu69 check this link. the text showing like white color only can't change our put the color.

How can i fix it?


Solution

  • Maybe add sized box widget. if its not working please post all code I can try something.