Replies: 2 comments 1 reply
-
Your problem is the create: (context) => FirebaseService(
uid: Provider.of<AuthenticationService>(context,
listen: false)
.getCurrentUID()) Since you're passing the UUID as parameter to FirebaseService, you're never dealing with cases where the UUID changes You should instead create a Stream that not only listens to the user data but also changes to the user ID. |
Beta Was this translation helpful? Give feedback.
1 reply
-
I solved it this way:
Instead of pushing to the / route I push it now to the main widget. This rebuilds the whole app. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If a user signed out and a different user logs in, the value of the streamprovider is not changing.
My structure:
main widget:
the route generator:
the AuthenticationWrapper:
This is working but at some point I want to sign out the user:
After the logout I want to sign in a different user but the userData Stream is still the old one. I think it has to do with the fact, that the provider ist in the main Widget above the MaterialApp and also above the / route (AuthenticationWrapper). How can I reset the Provider? If I put it in the AuthenticationWrapper then it could work I think but then I have the problem that the provider is not working anymore across all routes.
What I'm doing wrong?
Beta Was this translation helpful? Give feedback.
All reactions