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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File structure refactoring, fixed AppUser streaming via Provider #55

Merged
merged 5 commits into from
Jan 17, 2024

Conversation

tbeidlershenk
Copy link
Collaborator

Changes

  1. Changed folder structure to better categorize files and renamed some files / class names to match each other
  2. Fixed the AppUser stream in MultiProvider in main.dart in order to stream the user's data from Firestore based on the auth user
  3. Boy scout rule'd some files ~ most notably I made FirestoreService and AuthService to have only static methods (we were instancing these classes when we needed to use their methods, it didn't really make sense)
  4. Updated Wrapper to map to LoadingAnimation if the AppUser Provider hasn't received data yet

Notes

I think the way I did change # 4 is kind of bad let me know if you don't get what I did or have a better idea of how to do it. Also you can verify that the AppUser stream is working by looking in ProfilePage, it loads the first name of the user which is one of the fields that is only stored in Firestore, not in Firebase Auth

Copy link
Collaborator

@jeffzheng13 jeffzheng13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few changes from the errors I observed. Also, we probably don't care right now but we will see an error if user created an account without first name and last name set correctly, so we just need to be wary of that.

Copy link
Collaborator

@jeffzheng13 jeffzheng13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to go. Merging..

@jeffzheng13 jeffzheng13 merged commit 6d851f9 into main Jan 17, 2024
1 check passed
jeffzheng13 added a commit that referenced this pull request Jan 17, 2024
* File structure refactoring, fixed AppUser streaming via Provider

* Small Provider bug fix

* edited signup first name and last name mapping

* Changes from PR comments

---------

Co-authored-by: Tobias Beidler-Shenk <[email protected]>, Jeffrey Zheng <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants