PassioServingSize class

Data class that represents the serving sizes of a food item.

Constructors

PassioServingSize(double quantity, String unitName)
Creates a new PassioServingSize instance.
const
PassioServingSize.fromJson(Map<String, dynamic> json)
Creates a PassioServingSize instance from a JSON map.
factory

Properties

hashCode int
Calculates the hash code for this PassioServingSize object.
no setteroverride
quantity double
The quantity of the serving.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
unitName String
The unit name for the quantity (e.g., "grams", "ounces").
final

Methods

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

Operators

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