Home > front end >  how to add a text in bottom bar in Flutter?
how to add a text in bottom bar in Flutter?

Time:04-08

I want to write just a title in the bottom bar how to do that ? i want to write before icons the name of application bottomNavigationBar: BottomNavigationBar( backgroundColor: Color.fromARGB(255, 18, 68, 109),

    items: [
      BottomNavigationBarItem(
        icon: Icon(Icons.contacts),
        label: "back",
      ),
      BottomNavigationBarItem(
        icon: Icon(Icons.mail),
        label: "Emails",
      ),
      BottomNavigationBarItem(
        icon: Icon(Icons.person),
        label: "Profile",
      )
    ],
    
  ),

CodePudding user response:

Try below code hope its help to you.

items: <BottomNavigationBarItem>[
     BottomNavigationBarItem(
        icon: SizedBox(),
        label: "Back",
      ),
      BottomNavigationBarItem(
        icon: SizedBox(),
        label: "Emails",
      ),
      BottomNavigationBarItem(
        icon:  SizedBox(),
        label: "Profile",
      ),
    ],

Result Screen-> image

  • Related