Home > Blockchain >  The named parameter 'title' isn't defined. Issue in flutter
The named parameter 'title' isn't defined. Issue in flutter

Time:05-11

Issue

The named parameter 'title' isn't defined. Issue in flutter

Code:

 items: [
            BottomNavigationBarItem(
              icon: Icon(Icons.home),
              title: Text('Home'),
              backgroundColor: Colors.white,
            ),
            BottomNavigationBarItem(
              icon: Icon(Icons.chat),
              title: Text(
                'Chat',
              ),
              backgroundColor: Colors.white,
            ),
            BottomNavigationBarItem(
              icon: Icon(Icons.alarm_add),
              title: Text('Reminder'),
              backgroundColor: Colors.white,
            ),
            // BottomNavigationBarItem(
            //   icon: Icon(Icons.supervised_user_circle),
            //   title: Text(
            //     'Profile',
            //   ),
            //   backgroundColor: Colors.white,
            // ),
          ],

CodePudding user response:

Use label instead of title on BottomNavigationBarItem.

It will be like

 BottomNavigationBarItem(
              icon: Icon(Icons.home),
              label: 'Home',
              backgroundColor: Colors.white,
            ),

More about BottomNavigationBar and BottomNavigationBarItem.

  • Related