get Formatted Weight
Creates a LocalizedString that contains a text with a weight
Parameters
grams
the weight in gContent copied to clipboard
fun getFormattedWeight(grams: Double, unitValue: Double, precision: Int, tailingFractionZeros: Boolean): LocalizedString
Creates a LocalizedString that contains a text with a weight
Parameters
grams
the weight in gContent copied to clipboard
unit Value
factor that determines the technical postfix (1=g, 1000=kg, 0.001=mg, ...).
For automatic selection, pass the same value as for `grams`.Content copied to clipboard
precision
see [LocalizedStringNumber.precision]Content copied to clipboard
tailing Fraction Zeros
see [LocalizedStringNumber.tailingFractionZeros]Content copied to clipboard