-
Notifications
You must be signed in to change notification settings - Fork 307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StreamChat is overriding onGenerateRoute when navigating using named route #47
Comments
We added a navigator to make the StreamChat widget always be on top of the widget tree. I'll think about it and hopefully come with a better solution. For the moment you can try to use |
now i get this error when i call
|
Are you trying to use A possible solution is to put the widget |
Could you try the last version using the |
after using the last version and put |
Thank you for reporting the issue :) |
I was confused with that builder usage under MaterialApp and got rid of it, then I saw the same message error. I also use named routes. |
I think that's true, but you can always just initialize the client and call We're trying to find a better solution by the way. |
@imtoori just wanted to check if this issue was resolved in the latest version.I am working on an application and dont want to initialise the stream client above authentication. I am getting the same error quoted above 'You must have a StreamChat widget at the top of your widget tree' |
hey @siddhartha2000v this is not really an issue, but we've found a better solution than using the builder parameter of the MaterialApp and we're working on it Can you give me more information about your issue? |
Thanks for the update @imtoori. I am able to resolve the issue using the builder parameter in material app. However was looking for the update on better solution. Thanks for helping with current status anyways. |
it is a really bad design choice I think. The chat itself would require authentication (need to get a token for a specific user min). And as far as I see, no plan to change it :/ I am building an app, not concentrated on chat but have chat with as an extra feature. Users should log in (this is where they will get the token with their id). When a first-time user opens the app, there is no user so no token. Furthermore, users can log out and log in with different credentials. That time the client will be initialized with a different token. Any suggestions on what can I do without putting StreamChat into the builder? |
@barancezayirli : were you able to solve the issue ? I am in a similar situation right now . @imtoori : any solution for this ? |
@luvishq what's your issue? |
Expected results:
When using Navigator.pushNamed it goes to my own
onGenerateRoute
from mymain.dart
Actual results:
instead it goes to
onGenerateRoute
insidestream_chat.dart
:The text was updated successfully, but these errors were encountered: