![](/img/trans.png)
[英]How to increase on the size of the leading icon off an AppBar flutter
[英]Flutter: increase appBar icon height
我想放置一個圖標而不是appBar
小部件的標題,但我無法設置此圖標的正確高度。
appBar: PreferredSize(
preferredSize: Size.fromHeight(220.0),
child: AppBar(
title: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(
'assets/mobile-phone.png',
fit: BoxFit.contain,
width: 120,
height: 120,
)
],
),
elevation: 0.0,
backgroundColor: Colors.green,
brightness: Brightness.light,
),
),
盡管我將高度設置得更大並且它的實際尺寸也更大,但圖標達到了大約 60(單位?)的最大尺寸。
如何強制為appBar
小部件中的圖標設置高度?
這應該看起來像這樣
appBar: PreferredSize(
preferredSize: Size.fromHeight(220.0),
child: AppBar(
flexibleSpace: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(
'assets/mobile-phone.png',
fit: BoxFit.contain,
width: 120,
height: 120,
)
],
),
elevation: 0.0,
backgroundColor: Colors.green,
brightness: Brightness.light,
),
),
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.