skip to Main Content

Need to remove only right border of 1st TextField and only left border for 2nd TextField its overlaped.
Can’t remove whole border due to validation as its required field.

enter image description here

I have tried this :BorderRadius.only( topLeft: Radius.circular(4), bottomLeft: Radius.circular(4), bottomRight: Radius.zero, topRight: Radius.zero,) but its overlapping the border at one point.

2

Answers


  1. Try below code with container to achieve this

    Container(
                decoration: BoxDecoration(
                  border: Border(
                    left: BorderSide(
                      color: Colors.grey, 
                      width: 1.0, // Choose the width you want
                    ),
                    bottom: BorderSide(
                      color: Colors.grey, 
                      width: 1.0, // Choose the width you want
                    ),
                    top: BorderSide(
                      color: Colors.grey, 
                      width: 1.0, // Choose the width you want
                    ),
                  ),
                ),
                child: TextField(
                  decoration: InputDecoration(border: InputBorder.none),
                  style: TextStyle(fontSize: 18.0),
                ),
              )
    
    Login or Signup to reply.
  2. Please use this code:

                      Container(
                          decoration: const BoxDecoration(
                            border: Border.symmetric(
                              horizontal: BorderSide(
                                color: Colors.grey,
                                width: 1.0,
                              ),
                            ),
                          ),
                          child: const TextFormField(
                            decoration:
                                InputDecoration(border: InputBorder.none),
                            style: TextStyle(fontSize: 18.0),
                          ),
                        )
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search