Catalogue class
The class which manages the party catalogue
Constructors
-
Catalogue({List<
List< catalogue })CatalogueElement> > - Catalogue.fromFirestore(Map catalogueMap)
- Constructor for the creation of the catalogue when downloaded from Firestore
- Catalogue.initialization()
- Constructor for the initialization in the creation of a party
Properties
-
catalogue
↔ List<
List< CatalogueElement> > -
Matrix with the different CatalogueElements
read / write
- isEmpty → bool
-
Checks if the catalogue and its
List
s are emptyread-only - numberOfCategories → int
-
Number of cateogries in the Catalogue instance
read-only
- totalPoints ↔ int
-
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
-
catalogueMatrixMapper(
) → Map< String, Map< String, Map< >String, dynamic> > - Creates a matrix of Maps representing each CatalogueElement
-
ppp(
int numberOfPeople) → int - Returns the number of Pinder-points per person needed for the current Catalogue instance
-
printCatalogue(
) → void - Prints the catalogue field, for debuggng purposes
-
update(
Catalogue upToDateCatalogue) → void -
Updates the
chosenQuantity
fields in all the elements of the catalogue based on thelocallyChosenQuantyty
fields. It takes an up-to-date Catalogue instance, syncronized with Firestore, and adds up the quantity of every element chosen by the participants. -
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
- cataloguePath → const String
-
The path to the catalogue on the Database
'party_stuff'
-
dbNames
→ const List<
String> -
Names on the database of the different categories paths
const <String> ["drinks", "food", "utilities"]
-
dbSubCategories
→ const List<
List< String> > -
Paths for the different subcategories
const <List<String>> [const <String> ['alcohol', 'soft_drinks'], const <String> ['simple_food'], const <String> ['to_eat', 'to_drink…
-
icons
→ const List<
IconData> -
IconData
for the different categoriesconst <IconData> [Icons.local_bar, Icons.local_pizza, Icons.settings]
-
names
→ const List<
String> -
Names for the different categories
const <String> ["Drinks", "Food", "Utilities"]
-
pics
→ const List<
String> -
Background images for the cards
const <String> ["assets/img/beer_2.jpg", "assets/img/pasta.jpeg", "assets/img/kittens.jpeg"]