可以使用PreferredSize来设置AppBar的高度,并在其中包含一个FlexibleSpaceBar来调整CircleAvatar的大小。例如:
AppBar(
automaticallyImplyLeading: false,
backgroundColor: Colors.white,
brightness: Brightness.light,
elevation: 0,
centerTitle: true,
title: Text(
"My App",
style: TextStyle(
color: Colors.black,
fontSize: 20
),
),
bottom: PreferredSize(
child: FlexibleSpaceBar(
background: Container(
color: Colors.white,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children:
上一篇:Appbar中的按钮无法点击。
下一篇:AppBar中的分隔符未显示