Skip to content

Commit

Permalink
Merge pull request #29 from BU-Spark/user_updates
Browse files Browse the repository at this point in the history
Updates to the user fields
  • Loading branch information
jaimeyfrank authored Dec 3, 2024
2 parents d3322e8 + b31840b commit 2dd7c99
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
12 changes: 7 additions & 5 deletions bu_passport/lib/classes/user.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:bu_passport/classes/sticker.dart';
import 'package:cloud_firestore/cloud_firestore.dart';

class Users {
final String firstName;
Expand All @@ -11,8 +11,9 @@ class Users {
final int userPoints;
final String userProfileURL;
final Map<String, dynamic> userSavedEvents;
final bool admin;
final Map<Sticker, bool> userStickerCollection;
final Map<int, bool> userCollectedStickers;
final List<String> userPhotos;
final Timestamp userCreatedAt;

Users({
required this.firstName,
Expand All @@ -25,7 +26,8 @@ class Users {
required this.userSavedEvents,
required this.userPoints,
required this.userProfileURL,
required this.admin,
required this.userStickerCollection,
required this.userCollectedStickers,
required this.userPhotos,
required this.userCreatedAt,
});
}
5 changes: 3 additions & 2 deletions bu_passport/lib/pages/login_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,12 @@ class _LoginPageState extends State<LoginPage> {
'userProfileURL': user.photoURL,
'userPoints': 0,
'userSavedEvents': {},
// Additional fields to be filled by the user
'userBUID': '',
'userSchool': '',
'userYear': 0,
'admin': false,
'userCollectedStickers': {},
'userPhotos': [],
'userCreatedAt': FieldValue.serverTimestamp(),
});
// Set newUser flag
newUser = true;
Expand Down

0 comments on commit 2dd7c99

Please sign in to comment.