Trying to update BottomNavigationBarItems based on user successful signUp/signIn.
Not an expert in flutter or AWS, but have tried using either of the following to update a bool flag to render _listA
or _listB
Amplify.Auth.fetchAuthSession()
Amplify.Auth.getCurrentUser()
The problem I'm having is the BottomNavigationBar
renders faster than the above functions and app needs to reload to show the correct bar items.
Is there a solution like the following?
bottomNavigationBar: StreamBuilder<SomeState>(
stream: Amplify.Auth.SomeState,
builder: (context, snapshot) {
return BottomNavigationBar(
...
Any other alternative would be appreciated as well.