flutter - 如何通过主题更改 Flutter 中抽屉的标准汉堡菜单图标的大小
问题描述
在创建主题时:
appBarTheme: new AppBarTheme(
iconTheme: base.appBarTheme.iconTheme.copyWith(size: 100, color: Colors.red),
//Color is working but size having no effect*
),
解决方案
更改汉堡菜单的最简单方法是leading
从AppBar更改小部件
final _scaffoldKey = new GlobalKey<ScaffoldState>();
@override
Widget build(BuildContext context) {
return Scaffold(
key: _scaffoldKey,
appBar: AppBar(
leading: IconButton(
icon: Icon(Icons.menu, size: 40), // change this size and style
onPressed: () => _scaffoldKey.currentState.openDrawer(),
),
title: Text('Home Screen'),
),
body: Container(),
drawer: Container(
width: 300,
color: Colors.white,
),
);
}
此更改将创建这个巨大的汉堡菜单:
推荐阅读
- discord.js - 如何根据公会 discord.js 设置机器人的状态
- android - 我想使用 Android Studio 在我的 Android 应用程序中显示这种图像。我想显示的只是图像而不是扫描仪
- android - 如何将主类模型的数据传递给kotlin中的子类模型
- crystal-reports - 如何在 SAP B1 Crystal Reports 字段资源管理器中添加字段
- bootstrap-4 - 使用 Bootstrap 的 ASP.NET Core MVC 中的可点击磁贴
- python - 检查列表中的单词是否拼写正确
- java - 在 Ubuntu WSL 中运行 bash 脚本时出现不一致的 S3 参数验证错误
- firebase - Firestore 中的 Dialogflow 更新用户
- java - 在 Spring Batch 中使用 Teradata - 缺少方法 isWrapperFor
- python - 为什么我的神经网络使用 Jax 不收敛?