Reputation: 529
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',
),
],
),
),
Upvotes: 5
Views: 4170
Reputation: 2429
try this in your theme
theme: ThemeData(
canvasColor: Colors.transparent,)
Upvotes: 1