Prevent navigation change event to same page

This commit is contained in:
Anton Stubenbord
2022-12-13 01:29:55 +01:00
parent 64c431286e
commit 3dc590baa2

View File

@@ -49,8 +49,11 @@ class _HomePageState extends State<HomePage> {
key: rootScaffoldKey,
bottomNavigationBar: BottomNavBar(
selectedIndex: _currentIndex,
onNavigationChanged: (index) =>
setState(() => _currentIndex = index),
onNavigationChanged: (index) {
if (_currentIndex != index) {
setState(() => _currentIndex = index);
}
},
),
drawer: const InfoDrawer(),
body: [