'Implementing Flutter Icons in the `buildMenuItem()` Widget

In the Container widget, I have tried implementing many flutter icons and all are working well except for the cell_tower_rounded. This is an icon that is as well supported by icons Null safety.Kindly help why is this cell_tower icon not working while the rest are just ok. My editor underlines it in red and the error is undefined_getter

Container(padding,child,childred[
buildMenuItem(
    text: 'Connection Status',
    icon: Icons.cell_tower_rounded,
    onClicked: () => selectedItem(context, 0),
]),

enter image description here



Solution 1:[1]

I think you have some typo on your code. The correct should be

Container(padding,child:Row(children[
buildMenuItem(
    text: 'Connection Status',
    icon: Icon(Icons.cell_tower_rounded),
    onClicked: () => selectedItem(context, 0),
])),

You can use either Row or Column. It depends on what you want.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 John Joe