Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter How to give a Container border bottom only

In Flutter how to set a border for the bottom only,

As shown in the picture below, I have a Container with Text, showing a red color border from the bottom, Kindly guide how to set a border from the bottom only.

enter image description here

like image 206
Javeed Ishaq Avatar asked Dec 06 '25 06:12

Javeed Ishaq


1 Answers

Use Border with the bottom argument.

Container(
          decoration: BoxDecoration(
            border: Border(
              bottom: BorderSide(width: 1.5, color: Colors.grey[300]),
            ),
          ),
          child: ListTile(
            title: Text(title),
            subtitle: Text(score + dateFormatted),
            trailing: Row(
              mainAxisSize: MainAxisSize.min,
                 children: [
                    Text(amount),
                    Checkbox(
                       value: false,
                       activeColor: Colors.green,
                       onChanged: (bool newValue) {}),
                    ],
                   ),
           ),
);
like image 191
Bilaal Abdel Hassan Avatar answered Dec 07 '25 23:12

Bilaal Abdel Hassan



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!