I'm new to flutter development.
I've been trying to add SizedBox() but I'm getting the following Error at compile time
The argument type 'SizedBox' can't be assigned to the parameter type 'String?'.
Parameter text[No errors were shown with SizedBox() then, but text parameter itself] was migrated to label as suggested by Flutter.
Here is my code which throws the error.
BottomNavigationBarItem(
label: const SizedBox()
),
CodePudding user response:
You need to provide String
on label
, It can be label=""
BottomNavigationBarItem(
label: "Home"
),
More about BottomNavigationBarItem
CodePudding user response:
In this bottomBarItem label parameter you can't be assigning any widgets only assign String values if you want not to give any name you can assign them like this:
label : ""