enter image description herethis is the error occur.
bottomNavigationBar: BottomNavigationBar(
items: const <BottomNavigationBarItem>[
BottomNavigationBarItem(
icon: Icon(
Icons.home,
),
title: Text(
'Home',
),
),
BottomNavigationBarItem(
icon: Icon(
Icons.message,
),
title: Text(
'Messages',
),
),
BottomNavigationBarItem(
icon: Icon(
Icons.person,
),
title: Text(
'Profile',
),
),
],
),
enter image description here error code snippets
help for solve this problem.
3
Answers
the problem is that there is no property
title
in theBottomNavigationBarItem
, instead uselabel
also the error in the first picture says, that label is equal to
null
Bro there’s not parameter with name ‘title’ in the BottomNavigationBarItem. you need to use label for giving the text in the BottomNavigationBarItem widget and it aspects string directly.
So the updated code would look like this:
You should use label instead of title