我想在垂直方向上缩短边框,我尝试了很多方法但都没有用,所以我想知道如何制作它。 我想得到这样的结果:
我的镜头是:
代码:
DecoratedBox(
vdecoration: new BoxDecoration(
border: Border(left: BorderSide(color:
Theme.ColorsDari.colorGrey, width: 1.0,)),
),
child: IconButton(
icon: Icon(
Icons.notifications,
color: Theme.ColorsDari.colorGrey,
size: 19,
),
onPressed: () {
print("your menu action here");
},
),
)
最佳答案
尝试这样的事情:
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(backgroundColor: Colors.orange),
body: ListTile(
trailing: Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Container(
width: 1,
height: 24,
color: Colors.grey,
),
SizedBox(width: 10),
Icon(
Icons.notifications,
color: Colors.grey,
size: 19,
)
],
),
),
);
}
关于flutter - 如何垂直缩短边框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56568343/