return Scaffold(
// key: scaffoldKey,
extendBody: true,
// bottomNavigationBar:
bottomNavigationBar: Container(
height: 80,
child: ClipRRect(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(80.0),
topRight: Radius.circular(80.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',
),
],
),
),
),
backgroundColor: Color.fromARGB(255, 214, 7, 135),
I want to change the color of bottom navigation bar from green into transparent…I already gave white but showing like this(given photo)..how to do this?
(that green color is background color of my scaffold)
2
Answers
add color to your Container like this
bottomNavigationBar: Container(
color:Colors.red,
height: 80,
child: ClipRRect(…)
)
I don’t understand your problem. It seems like OK for me. Your code is working on my code.
Bottom Nav Screenshot
And here is my full code: