'i want to have a top radius on my bottomnavabar in flutter
class StartApp extends StatelessWidget {
const StartApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
body: Provider.of<BottomNavBarController>(context)
.widgetOptions
.elementAt(
Provider.of<BottomNavBarController>(context).selectedIndex),
bottomNavigationBar: Container(
decoration: footercontainerDecoration,
child: BottomNavigationBar(
backgroundColor: Colors.white,
currentIndex:
Provider.of<BottomNavBarController>(context).selectedIndex,
onTap: Provider.of<BottomNavBarController>(context).onItemTapped,
type: BottomNavigationBarType.fixed,
selectedItemColor: Colors.black,
selectedLabelStyle: const TextStyle(color: Colors.black),
unselectedItemColor: Colors.grey,
unselectedLabelStyle: const TextStyle(color: Colors.grey),
items: const [
BottomNavigationBarItem(
icon: ImageIcon(
AssetImage("assets/flavicons/home.png"),
),
label: "Home",
),
BottomNavigationBarItem(
icon: ImageIcon(
AssetImage("assets/flavicons/charts.png"),
),
label: "Home"),
BottomNavigationBarItem(
icon: ImageIcon(
AssetImage("assets/flavicons/ticket.png"),
),
label: "Home"),
BottomNavigationBarItem(
icon: ImageIcon(
AssetImage("assets/flavicons/atm.png"),
),
label: "Home"),
],
),
),
);
}
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
