Migration guide for moving from BottomNavigationBar to NavigationBar (#128263)

Fixes https://github.com/flutter/flutter/issues/127213
This commit is contained in:
Leigha Jarett
2023-06-05 23:52:07 -04:00
committed by GitHub
parent d87656559c
commit 6c8cf3a9d0
3 changed files with 50 additions and 20 deletions

View File

@@ -36,20 +36,22 @@ class _NavigationExampleState extends State<NavigationExample> {
currentPageIndex = index;
});
},
indicatorColor: Colors.amber[800],
selectedIndex: currentPageIndex,
destinations: const <Widget>[
NavigationDestination(
icon: Icon(Icons.explore),
label: 'Explore',
selectedIcon: Icon(Icons.home),
icon: Icon(Icons.home_outlined),
label: 'Home',
),
NavigationDestination(
icon: Icon(Icons.commute),
label: 'Commute',
icon: Icon(Icons.business),
label: 'Business',
),
NavigationDestination(
selectedIcon: Icon(Icons.bookmark),
icon: Icon(Icons.bookmark_border),
label: 'Saved',
selectedIcon: Icon(Icons.school),
icon: Icon(Icons.school_outlined),
label: 'School',
),
],
),