ProductNutriment

class ProductNutriment

Parameters

perServingInG

can be null if the product serving size is not specified

Functions

Link copied to clipboard
fun getForPortion(portion: Measurement): Measurement?

Calculates the nutriment value for a given amount of this product. For example, calling getForAnyValue(1, "kg") will give you the amount of this nutriment given 1 kg of the product.

Link copied to clipboard
fun getPer100gDisplayString(): String?
Link copied to clipboard
fun isEnergy(): Boolean

Properties

Link copied to clipboard
val modifier: Modifier
Link copied to clipboard
val name: String
Link copied to clipboard
val nutriment: Nutriment
Link copied to clipboard
val per100gInG: Measurement?
Link copied to clipboard
val per100gInUnit: Measurement?

Returns the amount of nutriment per 100g of product in the units stored in ProductNutriment.unit

Link copied to clipboard
val perServingInG: Measurement?
Link copied to clipboard
val perServingInUnit: Measurement?

Returns the amount of nutriment per serving of product in the units stored in ProductNutriment.unit.

Link copied to clipboard
val unit: MeasurementUnit