Flutter 如何只给容器边框底部

Jav*_*haq 12 flutter flutter-layout

在 Flutter 中如何仅设置底部边框,

如下图所示,我有一个带有文本的容器,从底部显示红色边框,请指导如何仅从底部设置边框。

在此输入图像描述

Bil*_*san 40

Border与参数一起使用bottom

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) {}),
                    ],
                   ),
           ),
);
Run Code Online (Sandbox Code Playgroud)