我怎樣才能讓我的應用欄按鈕(通知按鈕和選單,我不知道?)看起來像那樣?我的意思是,我如何復制 thisborder或background。也許我應該使用其他東西而不是出現?

現在我正在使用這個:
class _CustomAppBarState extends State<CustomAppBar> {
@override
Widget build(BuildContext context) {
return AppBar(
backgroundColor: Colors.transparent,
elevation: 0,
leading: IconButton(
icon: Icon(
Icons.menu,
color: Color(0xff736f71),
),
onPressed: () {},
),
actions: [
IconButton(
icon: Icon(Icons.add),
color: Color(0xff736f71),
onPressed: () {},
),
],
);
}
}```
uj5u.com熱心網友回復:
只需extendBodyBehindAppBar: true,在 Scaffold 內使用
uj5u.com熱心網友回復:
您可以將這樣的內容添加到您的身體中,而不是制作應用欄
Container(
margin: const EdgeInsets.only(top: 30),
decoration: BoxDecoration(
color: Colors.white24,
border: Border.all(color: Colors.white30),
borderRadius: BorderRadius.circular(30)),
padding: const EdgeInsets.symmetric(horizontal: 25, vertical: 20),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: const [
Icon(
Icons.menu,
color: Colors.white,
),
Icon(
Icons.add,
color: Colors.white,
),
],
),
],
),
)
輸出

轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/388665.html
