4

I have a bottom navigation bar inside in ClipRRect (for giving rounded corner). It has rounded corners but no transparent corners. I am sharing image for showing the problem. How can i do transparent rounded corners?

Code:

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',
            ),
          ],
        ),
      ),

enter image description here

John Joe
  • 12,412
  • 16
  • 70
  • 135
gurkan
  • 509
  • 1
  • 4
  • 18

2 Answers2

8

Try to reference to my answer, extendBody

Scaffold(
  extendBody: true,
Jim
  • 6,928
  • 1
  • 7
  • 18
0

try this in your theme

theme: ThemeData(
    canvasColor: Colors.transparent,)
Ardeshir ojan
  • 1,914
  • 1
  • 13
  • 36