Measurement

data class Measurement(val value: Float, val unit: MeasurementUnit)

Constructors

Link copied to clipboard
fun Measurement(value: Float, unit: MeasurementUnit)

Properties

Link copied to clipboard
val unit: MeasurementUnit
Link copied to clipboard
val value: Float

Extensions

Link copied to clipboard
fun Measurement.convertEnergyTo(targetUnit: MeasurementUnit): Measurement
Link copied to clipboard
fun Measurement.convertTo(unit: MeasurementUnit): Measurement
Link copied to clipboard
fun Measurement.convertToGrams(): Measurement

Converts a given measurement to grams.

Link copied to clipboard
fun Measurement.forPortion(portion: Measurement): Measurement
Link copied to clipboard
val Measurement.grams: Measurement
Link copied to clipboard
fun Measurement.saltToSodium(): Measurement
Link copied to clipboard
fun Measurement.sodiumToSalt(): Measurement
Link copied to clipboard
fun Measurement.toDisplayString(modifier: Modifier? = null): String