moo*_*der 2 dart flutter flutter-layout
我想在 Flutter 的 Drawer 中添加徽章(表明有新内容可用)。我使用 ListTile 在抽屉小部件内呈现菜单项。
ListTile(
title: Text("I'm a list tile"),
// this trailing widget can be the badge.
trailing: Container(
height: 14,
width: 14,
decoration: BoxDecoration(
color: Colors.red,
borderRadius: BorderRadius.all(Radius.circular(100)),
),
),
)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1155 次 |
| 最近记录: |