Flutter Container remove (bottom) border completely

Viewed 37

How do I remove the tiny part of the border beneath the "Choose Path" part ? Tried to remove the border completely but it didn't work and giving it the width of 0.0 didn't do the trick

Container(
                      width: double.maxFinite,
                      child: ClipRRect(
                        borderRadius: const BorderRadius.only(
                          topRight: Radius.circular(26),
                          topLeft: Radius.circular(26),
                        ),
                        child: OutlinedButton(
                            child: Column(
                              children: const [
                                Icon(
                                  Icons.expand_less,
                                  color: Colors.black,
                                  size: 40,
                                ),
                                Text(
                                  "Choose Path",
                                  style: TextStyle(
                                      color: Colors.black,
                                      fontSize: 23),
                                )
                              ],
                            ),
                            onPressed: () {
                              FocusManager.instance.primaryFocus?.unfocus();
                              if (_pc.isPanelClosed == true) {
                                _pc.open();
                              } else {
                                _pc.close();
                              }
                            }),
                      ),
                    ),

enter image description here

1 Answers

You can use TextButton instead of the OutlinedButton. Here is the code part

Container(
   ...
   child: ClipRRect(
       child: TextButton(
           ...
       )
   ...)
...)

this way the container will not have any border by default.

Related