Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove border from Flutter TextField

Tags:

flutter

I'm trying to remove the border outline from this TextField in flutter, but can't seem to figure the semantic way to do it.

                        decoration: InputDecoration(
                        labelStyle: const TextStyle(color: Colors.black),
                        contentPadding: const EdgeInsets.only(left: 25),
                        border: OutlineInputBorder(
                          borderRadius: BorderRadius.circular(40.0),
                        ),

Any help is greatly appreciated. Completely blanking on this.

*edit need to keep BorderRadius.cicrular active

**edit edit looking to remove the black line around this TextInput

enter image description here

like image 765
Will Avatar asked Feb 16 '26 12:02

Will


2 Answers

You can remove border outline TextField

Here some example may help you:

 TextFormField(
        decoration: new InputDecoration(
            border: InputBorder.none,
            focusedBorder: InputBorder.none,
            enabledBorder: InputBorder.none,
            errorBorder: InputBorder.none,
            disabledBorder: InputBorder.none,),


TextField(
    decoration: new InputDecoration(
        border: InputBorder.none,
        focusedBorder: InputBorder.none,
        enabledBorder: InputBorder.none,
        errorBorder: InputBorder.none,
        disabledBorder: InputBorder.none,
        hintText: "Hint here"),)
like image 182
Ethan Thai Avatar answered Feb 19 '26 04:02

Ethan Thai


Had to modify border to this:

border: OutlineInputBorder(
  borderRadius: BorderRadius.circular(10),
  borderSide: BorderSide.none,
),

To maintain BorderRadius.circular and also dump the outline.

like image 37
Will Avatar answered Feb 19 '26 05:02

Will



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!