app freeze by updating a page state varible

I have a sticky header with a tab bar and a sticky content with a listView.

When I press the tab, it will update a page state variable and hide/show the listView.

However when I press the new tab and press the previous tab back again, the app freeze.

my widget tree:

define onTap action for the tabBar:

update listView visibility by reading the listIndex page state:

1 reply