android - 在底部导航颤振后面扩展容器
问题描述
我正在尝试将底部导航栏后面的白色容器扩展到屏幕的最末端。不仅限于底部导航栏(如图所示)。
非常感谢任何帮助或想法,我是 Flutter 的新手。谢谢!
该应用程序的结构是:
bottomNavigationBar: BottomAppBar(
shape: CircularNotchedRectangle(),
notchMargin: 8.0,
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
IconButton(
icon: Icon(
Icons.show_chart,
),
onPressed: () {},
),
SizedBox(width: 48.0),
IconButton(
icon: Icon(
Icons.filter_list,
),
onPressed: () {},
),
],
),
),
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
floatingActionButton: FloatingActionButton(
child: Icon(Icons.add),
onPressed: () {},
),
body: Column(
children: <Widget>[
Expanded(
child: Container(
height: 100,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(40),
topRight: Radius.circular(40)
)
),
),
)
],
)
解决方案
您可以在“Scaffold”类中使用“extendBody: true”
Scaffold(
extendBody: true,
body: _yourBody(),
bottomNavigationBar: _yourBottomNavBar(),
)
推荐阅读
- reactjs - What does double forward slash asterisk "//*" do in React router route path matching?
- azure - 导致 Microsoft.VisualStudio.Coverage.VanguardException 的覆盖物覆盖率报告
- r - 无论任何缺失值如何,都使用 R rowmeans 获取均值
- java - 资源 glassfish 的 JNDI 查找失败
- kubernetes-pod - 有没有办法收集终止/关闭日志的日志
- python-3.x - ffi_prep_closure(): bad user_data(运行时看到的 libffi 库版本似乎与编译时看到的 'ffi.h' 不同)
- firebase - 在快照侦听器 Firestore 中看不到数组更新
- javascript - NPM 脚本:将一个脚本命令 json 输出作为参数值传递给另一个脚本命令
- android-studio - 在 Android 上自动录制音频
- javascript - Angular JS Material - 使用 UTC 时区打开日期时间选择器