You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use HydratedBloc, to keep some things in locale storage like Hive or SharedPreferences. So, I wanted to keep user profile data like createdAt, user-role, etc. on my profile page, and I print it from the services section In my codebase. The results surprised me. When the internet connection is available, then it shows the correct user values, but when I close my internet connection, it shows the current time and date.
For example, if a user was created in 2020, and If I close my internet connection, the service returns me to 12/28/2022 and the user role as null.
I'm sure that I use it correctly because I also use firebase auth. Even it's not related to my locale storage solution, because I print in the service section in my codebase. So, I think that's the bug.
Steps to reproduce
in the services section, there is a getter whose name is currentUserStream, and from there, you can find the current user whose name is OwnUser. So, If you debug it, you can see the problem.
Supporting info to reproduce
@overrideStream<ChatUserModel> get chatAuthStateChanges {
return streamChatClient.state.currentUserStream.map(
(OwnUser? user) {
print("here my user: $user");
if (user ==null) {
returnChatUserModel.empty();
} else {
return user.toDomain();
}
},
);
}
Relevant log output
If there is a connection:
flutter: here my user: OwnUser(clg.............3, user, 2022-12-28 19:18:38.720025Z, true, {invisible: false, unread_count: 0, name: Alper, image: https://firebasestorage.googleapis.com/v0/b....4a}, false, null, [], )
If connection is lost:
flutter: here my user: OwnUser(c.....fCrIaS6pB1HDI3, null, null, false, {name: Alper, image: https://firebasestorage.googleapis.com/v0/b/...34a}, false, null, [], null)
Flutter analyze output
No response
Flutter doctor output
No response
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
Which packages are you using?
stream_chat_flutter
On what platforms did you experience the issue?
iOS, Android
What version are you using?
stream_chat_flutter: ^5.1.0
What happened?
I use HydratedBloc, to keep some things in locale storage like Hive or SharedPreferences. So, I wanted to keep user profile data like createdAt, user-role, etc. on my profile page, and I print it from the services section In my codebase. The results surprised me. When the internet connection is available, then it shows the correct user values, but when I close my internet connection, it shows the current time and date.
For example, if a user was created in 2020, and If I close my internet connection, the service returns me to 12/28/2022 and the user role as null.
I'm sure that I use it correctly because I also use firebase auth. Even it's not related to my locale storage solution, because I print in the service section in my codebase. So, I think that's the bug.
Steps to reproduce
in the services section, there is a getter whose name is currentUserStream, and from there, you can find the current user whose name is OwnUser. So, If you debug it, you can see the problem.
Supporting info to reproduce
Relevant log output
Flutter analyze output
No response
Flutter doctor output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: