BottomAppBar浮动操作按钮的凹口/插入不透明

ish*_*aan 6 flutter

BottomAppBar在materialApp中的脚手架中添加了一个,并在中间添加了一个带有插图的fab。代码看起来像这样

Scaffold(
    bottomNavigationBar: BottomAppBar(
        color: Theme.of(context).accentColor,
        shape: CircularNotchedRectangle(),
        child: _buildBottomBar(context),
    ),
    floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
    floatingActionButton: FloatingActionButton(
        backgroundColor: Theme.of(context).primaryColor,
        child: Center(
        child: Icon(
            Icons.add,
            size: 32.0,
        ),
        ),
        onPressed: () {
        Navigator.push(
            context,
            MaterialPageRoute(builder: (context) => CreateEvent()),
        );
        },
    ),
)
Run Code Online (Sandbox Code Playgroud)

这就是渲染后我得到的:

在此处输入图片说明

缺口不是透明的,其背后的内容被隐藏了。

有没有办法解决这个问题?我可能想念的东西吗?

Reb*_*bar 10

您只需要位于flutter频道:master,然后添加到Scaffold:

Scaffold(
   extendBody: true
);
Run Code Online (Sandbox Code Playgroud)

它应该是透明的:)

招呼

钢筋