PassioSearchNutritionPreview class

Represents a preview of the nutritional information for a food item,

Constructors

PassioSearchNutritionPreview({required int calories, required double carbs, required double fat, required double protein, required double fiber, required double servingQuantity, required String servingUnit, required double weightQuantity, required String weightUnit})
Creates a new instance of PassioSearchNutritionPreview.
const
PassioSearchNutritionPreview.fromJson(Map<String, dynamic> json)
Creates a new instance of PassioSearchNutritionPreview from a JSON map.
factory

Properties

calories int
The number of calories in the specified serving size.
final
carbs double
The amount of carbohydrates.
final
fat double
The amount of fat.
final
fiber double
The amount of fiber.
final
hashCode int
Calculates the hash code for this PassioSearchNutritionPreview object.
no setteroverride
protein double
The amount of protein.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
servingQuantity double
The quantity of the serving size (e.g., 1.5, 100).
final
servingUnit String
The unit of measurement for the serving size (e.g., "cup", "gram").
final
weightQuantity double
The weight of the serving size as a quantity.
final
weightUnit String
The unit of measurement for the weight of the serving size (e.g., "gram").
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts the PassioSearchNutritionPreview object to a JSON map.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
Compares two PassioSearchNutritionPreview objects for equality.
override