Column(
                    crossAxisAlignment: CrossAxisAlignment.end,
                    mainAxisAlignment: MainAxisAlignment.end,
                    children: <Widget>[
                      Row(
                        //    crossAxisAlignment: CrossAxisAlignment.end,
                        mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                        children: <Widget>[
                          FloatingActionButton(
                            onPressed: () {
                              //ClearSession();
                              if (Navigator.canPop(context)) {
                                Navigator.pop(context, true);
                              }
                              Navigator.pushReplacement(
                                  context,
                                  MaterialPageRoute(
                                      builder: (context) =>
                                          Home(22.0, 22.0)));
                            }
                            // Add your onPressed code here!
                            ,
                            backgroundColor: Colors.green,
                            child: const Icon(Icons.home),
                          ),
                          FloatingActionButton(
                            onPressed: () {
                              //ClearSession();
                              if (Navigator.canPop(context)) {
                                Navigator.pop(context, true);
                              }
                              Navigator.pushReplacement(
                                  context,
                                  MaterialPageRoute(
                                      builder: (context) =>
                                          const Calender()));
                            }
                            // Add your onPressed code here!
                            ,
                            backgroundColor: Colors.green,
                            child: const Icon(Icons.calendar_month),
                          ),
                          FloatingActionButton(
                            onPressed: () {
                              //ClearSession();
                              if (Navigator.canPop(context)) {
                                Navigator.pop(context, true);
                              }
                              Navigator.pushReplacement(
                                  context,
                                  MaterialPageRoute(
                                      builder: (context) =>
                                          const Community()));
                            },
                            backgroundColor: Colors.green,
                            child: const Icon(Icons.article_rounded),
                          ),
                          FloatingActionButton(
                            onPressed: () {
                              // Add your onPressed code here!
                            },
                            backgroundColor: Colors.green,
                            child: const Icon(
                                Icons.settings_accessibility_sharp),
                          ),
                        ],
                      ),
                    ],
                  ),

它应该与所有类型的屏幕兼容,无论屏幕大小 我不想使用填充,因为它只适用于某些屏幕,不适用于所有类型的屏幕 图标位于屏幕中央,

我想把它们都放在屏幕上的按钮里

this is  the current position of icons

it should be compatible with all types of screens regardless of screen size I don't want to use padding because it only works for some screen,not for all type of the screen the icons are in the middle of the screen, 我想把它们都放在屏幕上的按钮里

推荐答案

使用scaffold(),然后将Row()放入floatingActionButton中,如下所示:

Scaffold(
  appBar: ...
  body:...
  floatingActionButton: // your Row()
);

Flutter相关问答推荐

自动测试Flutter应用程序进行QA的最佳方法是什么?

Flutter 翼doctor 显示的错误,我似乎不能修复.问题:系统32、Android工具链、Windows 10 SDK

在Flutter 中每次点击按钮时都很难调用自定义函数

如何在Flutter 中共享选定文本

如何在不注销的情况下刷新Firebase身份验证用户

将记录/元组用作SplayTreeMap中的键

如何从flutter中不同类别的列表中获取所有产品

如何在flutter中将所有单词的第一个字母大写

Flutter: pie_chart 插件动画滚动问题

在 Flutter 中,SpinEdit 叫什么?

无状态小部件被奇怪地重建

如何在 Flutter 中使用 drawLine() 和 drawCircle() 绘制等距离的 4 条线

Flutter 动画页面计数器文本

Riverpod 在使用冻结副本更新状态时触发重建,即使没有任何更改

如何在 Flutter 中创建 Facebook 创建帖子屏幕?

Flutter:如何判断嵌套列表是否包含值

Firebase Cloud Messaging (Flutter):订阅主题时出现错误消息

http响应在Flutter 中返回307

既然我们已经有了 Flutter 的内置 setState,为什么还要在 Flutter 中使用 BloC 或 Provider?

Flutter - 检测手指何时进入容器