Floating Action Button centerdocked,是否与任何屏幕或对话框重叠?

问题描述 投票:0回答:1

我正在底部导航栏中的FloatingActionButton(FAB)中使用动画图标。但是FAB重叠了从BottomAppBar打开的任何页面或对话框,我该如何解决?

[当我使用Navigator.pushNavigator.pushNamedmodalBottomSheet或对话框打开新页面时,工厂将它们重叠。仅在使用pushReplacementNamed打开新页面时有效。

如何显示不带晶圆厂的modalSheet和仅使用pushNamed的页面?

我使用this参考。

floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
        floatingActionButton: _buildFab(context, model),
        bottomNavigationBar: BottomAppBar(
          color: CustomTheme.getThemeData(context).getAccentColor(),
          shape: CircularNotchedRectangle(),
          notchMargin: 4.0,
          child: new Row(
            mainAxisSize: MainAxisSize.max,
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
            children: <Widget>[
              IconButton(
                icon: Icon(Icons.menu),
                onPressed: () => _showModal(),

              ),
              IconButton(
                icon: Icon(Icons.home),
                onPressed: () => {},
              ),
            ],
          ),
        ),

这是我的FAB“

并且这会在显示模态或任何页面时发生“

[我需要您的帮助。我不知道该怎么办:-(

flutter dart flutter-layout flutter-animation
1个回答
0
投票

如果在Modal底板上发生这种情况,请尝试增加底板的高度。像这样

showModalBottomSheet(context: context, builder: (context) {
  return AddressChangeBottomSheet(
      title: "Change Area",
      showAddress: false,
      cityAreaList: list, onAddressChangeSubmit: () {
    mainBloc.fetchUpdatedUser();
  });
}, elevation: 10.0)
© www.soinside.com 2019 - 2024. All rights reserved.