flutter cheat sheet

-


组件

PopupMenuButton

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
PopupMenuButton(
padding: EdgeInsets.all(20),
icon: Image.asset(
"asset/image/Profile Image.png",
width: 50,
),
tooltip: "gech",
offset: Offset(0, 100),
onSelected: _onActionSelected,
itemBuilder: (context) {
return ["admin", "sign out"]
.map((e) => PopupMenuItem(
child: Text(e),
value: e,
))
.toList();
}),

圆形按钮

1
2
3
4
5
6
7
8
9
10
11
Material(
shape: CircleBorder(),
child: InkWell(
child: Image.asset(
"asset/image/img_326384.png",
color: Colors.black,
width: 40,
),
onTap: () {},
),
)

  flutter
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×