User class

Class to define the application's user

Constructors

User({String email, String name, String surname, String profilePictureUrl, String uid })

Properties

email ↔ String
The user's email.
read / write
feedback → double
The feedback (in percentage) of the user as participant to the party. This is related to the reliability of the user in bringing what he is supposed to.
read-only
name ↔ String
The user's name.
read / write
numberOfFeedbacks ↔ int
The total number of feedbacks (thumbs-ups and thumb-downs) received by the user as participant to parties. See feedback.
read / write
numberOfReviews ↔ int
The number of reviews the user was given by the participants to the parties the user organised.
read / write
profilePictureUrl ↔ String
The URL of the profile picture of the user, hosted on Firebase Storage.
read / write
rating ↔ double
The rating given to the user, by the participants to the parties the user organised.
read / write
surname ↔ String
The user's surname.
read / write
thumbsUpByOrganisers ↔ int
The number of thumbs-ups given by the organisers of the parties the user took part to. See feedback.
read / write
uid ↔ String
Unique ID used by firebase_auth.
read / write
hashCode → int
The hash code for this object. [...]
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

fromFirestore(DocumentSnapshot snapshot) → void
sendUser() → Future<Null>
Uploads the user on the DB, it is used during the creation of the user, within SignUpButton.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator. [...]
inherited

Static Methods

userDownloader({User user, String uid }) → Future<User>
Downloads a user from Firestore. If the uid field is given, it takes the gets the user with the given UID, otherwise it will look for the Firebase current user instance. If the given User is null or is not inserted, the method creates a new instance of User. The methos will save the user's data using the fromFirestore method.

Constants

usersDbPath → const String
The path to the user collection on the DB.
'users'