flutter - How to shorten the border vertically
问题描述
I m trying to shorten the border vertically, i have tried many way but not of them work, so i want to know how to make it. i want to get result like that:
and my shot is :
Code :
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,
)
],
),
),
);
}
推荐阅读
- bootstrap-4 - 想知道如何在标签旁边创建一个箭头
- r - 带有图案的地理空间多边形图例 - R
- linux - 如何获得多个 bash 后台脚本,从一个初始启动脚本生成以登录终端的正确行?
- c# - 如何使用破折号分隔的字符串搜索 SharePoint 文件?
- c# - ASP.Net Core - IISHttpServer.HandleRequest 中的意外异常
- perl - 如何修复 Perl 脚本中 strftime 中的使用错误
- django - 字段名称“用户名”对于模型“用户”django rest-auth 无效
- react-native - EXPO : 分享音频文件
- javascript - $fireDb 在 Nuxt Fire / Firebase Vuex 中未定义
- reactjs - 使用 React Hooks 切换对象中一项的值