颤动圆角底部导航栏

gur*_*kan 5 flutter android-bottomnav flutter-layout

我在 ClipRRect 中有一个底部导航栏(用于提供圆角)。它有圆角,但没有透明角。我正在分享图像来显示问题。如何制作透明圆角?

代码:

bottomNavigationBar: ClipRRect(
        borderRadius: BorderRadius.only(
          topLeft: Radius.circular(30.0),
          topRight: Radius.circular(30.0),
        ),
        child: BottomNavigationBar(
          currentIndex: _selectedIndex,
          selectedItemColor: Colors.amber[800],
          onTap: _onItemTapped,
          items: <BottomNavigationBarItem>[
            BottomNavigationBarItem(
              icon: Icon(Icons.home),
              label: 'Home',
            ),
            BottomNavigationBarItem(
              icon: Icon(Icons.search),
              label: 'Search',
            ),
            BottomNavigationBarItem(
              icon: Icon(Icons.person),
              label: 'Profile',
            ),
          ],
        ),
      ),
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

Jim*_*hiu 8

尝试参考我的答案,extendBody

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