flutter - 在颤动的BottomNavigationBar中不起作用
问题描述
bottomNavigationBar: new BottomNavigationBar(items: [
new BottomNavigationBarItem(icon: new Icon(Icons.account_balance))]),
当我运行时,我收到此错误
解决方案
您需要至少有 2 个孩子来满足您的items
喜好:
bottomNavigationBar: BottomNavigationBar(
items: [
BottomNavigationBarItem(
icon: Icon(Icons.account_balance),
),
BottomNavigationBarItem(
icon: Icon(Icons.account_circle),
),
],
)
推荐阅读
- python - 更有效的递归方法
- c# - 如何在网格中搜索矩阵和匹配模式?
- bash - 使用 nohup 在 EC2 用户数据中执行的脚本在手动 SSH 进入之前不会运行
- python - 在 Python 中按数据框的子集重复计算
- python - sklearn.linear_model.LogisticRegression 中的“L1_ratio”和“C”
- javascript - Javascript - 确保字符串字段包含某些字符和数字
- hibernate - 如何按 Spring data jpa 中的 json 字段排序?
- python - 如何使用for循环提取每个数据?
- sharepoint-online - 将共享点页面上的自定义字段添加到自定义内容类型中
- testing - 如何查看下载的文件名?