Party class

Class that defines every Party object in the app.

Constructors

Party({String name, DateTime fromDayTime, DateTime toDayTime, String organiserUid, String place, double rating, int ratingNumber, Privacy privacy, int pinderPoints, String description, String id, String imageUrl, File localImageFile, int maxPeople, Catalogue catalogue })
Party.fromSnapshot(DocumentSnapshot snapshot)
Constructor used to create a Party instance from a DocumentSnapshot, which is, essentially, a Map.

Properties

catalogue Catalogue
The Catalogue of the party.
read / write
compressedImageFile ↔ File
The file of the compressed image chosen locally by the party organiser.
read / write
description ↔ String
The description for the party. it is chosen by the organiser.
read / write
fromDayTime ↔ DateTime
The beginning day and time of the party, chosen by the organiser.
read / write
id ↔ String
The ID on Firebase Firestore on the database, automatically assigned by Firestore.
read / write
imageUrl ↔ String
Url on Firebase Storage of the party's image.
read / write
localImageFile ↔ File
The file of the image chosen locally by the party organiser.
read / write
maxPeople ↔ int
The maximum number of people that can participate to the party, chosen by the organiser.
read / write
name ↔ String
The name of the party.
read / write
organiser User
read / write
organiserUid ↔ String
The UID of the organiser.
read / write
pinderPoints ↔ int
The number of necessary pinder points to participate to the party. it will soon be deprecated, since the number of points is a property of Catalogue class.
read / write
place ↔ String
The place of the party.
read / write
privacy Privacy
The privacy of the party
read / write
rating ↔ double
The rating of the organiser, will be deprecated, since it's a characteristic of User class.
read / write
ratingNumber ↔ int
The number of ratings of the organiser, will be deprecated, since it's a characteristic of User class.
read / write
toDayTime ↔ DateTime
The ending date and time of the party, chosen by the organiser.
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

addNewParty() → Future<Null>
Pushes the newly created party on the DB.
handleParticipation() → Future<Null>
Handles the participation to the party, updating the catalogue (adding the number of stuff that the participant is going to bring). TODO: In the future it will even handle the participants' profiles.
uploadImage() → Future<Null>
Uploads the image requested by the user.
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

Constants

city → const String
The default city used to show parties until we will introduce the possibility to choose the city.
"Shanghai"