[go: nahoru, domu]

Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display User data #209

Closed
himanshusharma89 opened this issue Apr 25, 2021 · 5 comments 路 Fixed by #212
Closed

Display User data #209

himanshusharma89 opened this issue Apr 25, 2021 · 5 comments 路 Fixed by #212
Assignees
Labels
GSSOC21 Issues created for GSSOC'21 Level2 medium gssoc issue

Comments

@himanshusharma89
Copy link
Owner

Use the User data to display it in the Home and Profile Screen

Discussion 馃棧

We have saved the user data to firestore , now we need to use that user to display the name and email in the home screen and profile screen

Context

You can use the existing StreamBuilder in main.dart to store the User, or you can propose a different method to do that.

@himanshusharma89 himanshusharma89 added the Level2 medium gssoc issue label Apr 25, 2021
@github-actions github-actions bot added the GSSOC21 Issues created for GSSOC'21 label Apr 25, 2021
@anotherwebguy
Copy link
Contributor

hey @himanshusharma89 i would like to work on this issue under gssoc
i've an different approach
we will fetch the data in a different class and then we call this method to get the user info wherever we want to display it
here's an example
Untitled

@himanshusharma89
Copy link
Owner Author

@anotherwebguy Assigned. But talking about the approach, as we already are using StreamBuilder which will give the User stream, we can use your fetchData method(Without FirebaseFirestore Instance call) in line 62 of main.dart and pass down the User and then we can save it locally in a RelicUser Model.

@anotherwebguy
Copy link
Contributor

@anotherwebguy Assigned. But talking about the approach, as we already are using StreamBuilder which will give the User stream, we can use your fetchData method(Without FirebaseFirestore Instance call) in line 62 of main.dart and pass down the User and then we can save it locally in a RelicUser Model.

We need the data from firestore user collection right? So we have to use firebasefirestore.instance ?

@himanshusharma89
Copy link
Owner Author

@anotherwebguy Oh yeah, I forgot about the user's collection, okay, so we can just use the stream to check whether that particular uid exists in the users collection, if so we will pass it to our RelicUser model.

@anotherwebguy
Copy link
Contributor

@anotherwebguy Oh yeah, I forgot about the user's collection, okay, so we can just use the stream to check whether that particular uid exists in the users collection, if so we will pass it to our RelicUser model.

Yes @himanshusharma89 i'll make a pr by tomorrow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GSSOC21 Issues created for GSSOC'21 Level2 medium gssoc issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants