Custom bottom navigation bar is not visible to all pages in flutter

689 views
Skip to first unread message

Rohit Kurzekar

unread,
Apr 2, 2020, 1:05:11 AM4/2/20
to Flutter Development (flutter-dev)
I have integrated custom bottom navigation bar in my flutter app but when I navigate to another page it is not showing. Can some one help me why the custom bottom navigation bar is not showing on other pages?
In which page I have to add the custom bottom navigation bar code so that it will visible to all pages. 

Himanshu Sharma

unread,
Apr 2, 2020, 1:27:01 AM4/2/20
to Flutter Development (flutter-dev)
Can you show me the code? 

Rohit Kurzekar

unread,
Apr 2, 2020, 2:45:30 AM4/2/20
to Flutter Development (flutter-dev)
@override
  Widget build(BuildContext context) {
    SystemChrome.setSystemUIOverlayStyle(
        SystemUiOverlayStyle(statusBarColor: Colors.transparent));
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      theme: ThemeData(primarySwatch: Colors.blue),
      home: Scaffold(
        bottomNavigationBar: CurvedNavigationBar(
          key: _bottomNavigationKey,
          index: 2,
          height: 50.0,
          items: <Widget>[
            Icon(Icons.folder_open, size: 23),
            Icon(Icons.pie_chart_outlined, size: 23),
            Icon(Icons.event, size: 23),
            Icon(Icons.person_outline, size: 23),
            Icon(Icons.lightbulb_outline, size: 23),
          ],
          onTap: _onItemTapped,
          color: Colors.white,
          buttonBackgroundColor: Colors.white,
          backgroundColor: Color(0xFFD2E0F1),
          animationCurve: Curves.easeInOut,
          animationDuration: Duration(milliseconds: 600),
        ),
)

Souvik Dutta

unread,
Apr 2, 2020, 5:09:46 AM4/2/20
to Rohit Kurzekar, Flutter Development (flutter-dev)
Actually the bar is still there just that the color has changes when you change pages in a way that makes the perfect blend with the background and it becomes invisible(like an invisibility cloak 🤣🤣). I think you should check the Colors and give all the individual items there own backgrounds Color. I hope this works.

--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/0ac89e67-b2d8-4d3b-b08e-8551ba458170%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages