flutter 浮动操作按钮布局(Android)

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

是否可以像下面的布局一样显示颤动操作按钮(打开时的第二张图片)?我尝试过快速拨号或尝试创建自定义布局,但无法实现第二个图片布局。有什么办法可以实现这一点吗?

android flutter mobile floating-action-button
1个回答
0
投票

在第一张图片中进行布局

Scaffold(
        resizeToAvoidBottomInset: false,
        floatingActionButton: floatingBtn(context),
        bottomNavigationBar: bottomNavigationBar(context),
        floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
      )

注意:我刚刚提供了主要属性,您可以根据需要设计小部件

这是BottomAppBar代码

BottomAppBar(
        notchMargin: 11,
        surfaceTintColor: Colors.red,
        shape: CircularNotchedRectangle(),
        child: Row(
          children: [
            
          ],
        ),
      )

用于第二张图片中的设计 您可以使用这里的任何插件 或者您可以创建自定义浮动操作按钮,这里是自定义 fab 的示例

© www.soinside.com 2019 - 2024. All rights reserved.