我正在尝试更改我的ThemeData中的应用栏中图标的大小(导航器提供的“ Back”和Scaffold提供的“ Drawer”,通过修改iconTheme和primaryIconTheme:
ThemeData(
primarySwatch: Colors.blue,
iconTheme: IconThemeData(color: Colors.grey, size: 32),
primaryIconTheme: IconThemeData(color: Colors.grey, size: 32)
),
此行仅更改图标的颜色,但大小不变。
我不需要更改Flutter处理此按钮的行为,只需更改其大小即可。
AppBar(
leading: ModalRoute.of(context)?.canPop == true
? IconButton(
icon: Icon(
Icons.arrow_back,
size: 60,
),
)
: null,
title: Text(
"Example",
),
)