PassioFoodRecipe class
Data class the holds the nutritional information of a food item that is classified as a recipe. A recipe has multiple ingredients, but their quantity is controlled by a single selectedUnit and selectedQuantity.
Constructors
-
PassioFoodRecipe(PassioID passioID, String name, List<
PassioServingSize> servingSizes, List<PassioServingUnit> servingUnits, String selectedUnit, double selectedQuantity, List<PassioFoodItemData> foodItems) -
PassioFoodRecipe.fromJson(Map<
String, dynamic> json) -
factory
Properties
-
foodItems
→ List<
PassioFoodItemData> -
List of ingredients of the recipe.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
Recipe name.
final
- passioID → PassioID
-
Identifier of food recipe.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedQuantity ↔ double
-
Currently selected quantity.
getter/setter pair
- selectedUnit ↔ String
-
Currently selected unit.
getter/setter pair
-
servingSizes
→ List<
PassioServingSize> -
List of predefined serving sizes.
final
-
servingUnits
→ List<
PassioServingUnit> -
List of predefined serving units.
final
Methods
-
computedWeigth(
) → UnitMass -
isOpenFood(
) → bool -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
openFoodLicense(
) → String? -
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited