gpt4 book ai didi

flutter - 如何在不使用 Flutter 底部导航栏的情况下显示固定在屏幕底部的容器?

转载 作者:行者123 更新时间:2023-12-03 04:28:03 28 4
gpt4 key购买 nike

在我的 flutter 项目中,我有一个容器,下面有一些图标和文本。我希望将整个容器固定在屏幕底部,而不使用如下图所示的底部导航栏 -

enter image description here

所以,我需要一个完整的例子来修复底部的容器,并将我的其他组件保留在带有 ScrollView 的 body 中。

最佳答案

好的,
干得好....

return Scaffold(
appBar: AppBar(
title: Text("Header"),
),
body: Column(
children: <Widget>[
Expanded(
child: Container(
alignment: Alignment.center,
child: Text("Hello"),
),
),
Container(
height: 50,
width: double.maxFinite,
decoration: BoxDecoration(

color: Colors.deepOrange,
borderRadius: BorderRadius.vertical(top: Radius.circular(20.0))
),
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
IconButton(icon: Icon(Icons.arrow_forward), onPressed: (){},),
IconButton(icon: Icon(Icons.arrow_downward), onPressed: (){},),
IconButton(icon: Icon(Icons.arrow_left), onPressed: (){},),
IconButton(icon: Icon(Icons.arrow_upward), onPressed: (){},),
],
),
)
],
),
);

关于flutter - 如何在不使用 Flutter 底部导航栏的情况下显示固定在屏幕底部的容器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58030067/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com