How to remove the outermost border lines of table in flutter | Flutter

Viewed 3994
                  Container(
                        height: 100,
                        width: 350,
                        decoration: BoxDecoration(
                          color: Colors.white,
                          borderRadius: BorderRadius.all(
                            Radius.circular(15),
                          ),
                        ),
                        child: Table(
                          defaultColumnWidth: FixedColumnWidth(120.0),
                          border: TableBorder.all(
                            color: Colors.grey[600],
                            //style: BorderStyle.solid,
                            width: 0.5,
                          ),
                          children: [
                            TableRow(),
                            TableRow(),
                            TableRow(),
                              ],
                              
                               ),
                          
                              ],
                            ),
                          ],
                        ),
                      ),

I need to remove the outermost border line of this table. I here use Table widget to show the table. The image with this is the output i want. Is there any method to remove the outermost lines or any other ideas to make like this. https://drive.google.com/file/d/1v1BWmO56m6Zq4kPgiyOoCzv8K2XvrFU7/view?usp=sharing is the link of the widget i want to build.

2 Answers

In the TableBorder class there's a property TableBorder.symmetric which specifies the outer and inner border separately.

The optimized code would look like:

Table(
   border: TableBorder.symmetric(
       outside: BorderSide.none, 
       inside: const BorderSide(width: 1, color: Colors.grey, style: BorderStyle.solid),
   ),
   children: [
       TableRow(),
       TableRow(),
       TableRow(),
   ],
)
Related