From 15017726ce5c7f2e7488db6ae779f14efff2d715 Mon Sep 17 00:00:00 2001 From: Pawan Date: Thu, 28 May 2020 19:25:11 +0530 Subject: [PATCH] Update tab_containter_load1time.dart Index issue when you select the last tab can be fixed by replacing the below line body: IndexedStack(index: tabIndex, children: listScreens), with body: IndexedStack(index: listScreensIndex.indexOf(tabIndex), children: listScreens), --- lib/tab_containter_load1time.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tab_containter_load1time.dart b/lib/tab_containter_load1time.dart index a00b4af..4c28960 100644 --- a/lib/tab_containter_load1time.dart +++ b/lib/tab_containter_load1time.dart @@ -55,7 +55,7 @@ class _TabContainerLoad1TimeState extends State { return MaterialApp( color: Colors.yellow, home: Scaffold( - body: IndexedStack(index: tabIndex, children: listScreens), + body: IndexedStack(index: listScreensIndex.indexOf(tabIndex), children: listScreens), bottomNavigationBar: BottomNavigationBar( currentIndex: tabIndex, onTap: _selectedTab,