Home > Blockchain >  what to use instead of title widget in vs code
what to use instead of title widget in vs code

Time:06-21

BottomNavigationBarItem(icon: Icon(Icons.access_alarm),title: Text("first")), vs code editor said

"message": "'title' is deprecated and shouldn't be used. Use \"label\" instead, as it allows for an improved text-scaling experience. This feature was deprecated after v1.19.0..\nTry replacing the use of the deprecated member with the replacement.",
"source": "dart",
"startLineNumber": 25,
"startColumn": 68,
"endLineNumber": 25,
"endColumn": 73,
"tags": [
    2
]

}]

CodePudding user response:

Use "label" widget instead of "title"

BottomNavigationBarItem(
                      icon: Icon(Icons.add),
                      label: "Hello",
                    )

CodePudding user response:

You should use 'label' like BottomNavigationBarItem( icon: Icon(Icons.home), label: 'Home', ),

  • Related