Weight.fromGrams constructor
Weight.fromGrams(
- Rational grams
Creates a Weight representing the specified number of grams
.
Implementation
factory Weight.fromGrams(Rational grams) =>
Weight.fromUnits(WeightUnit.gram, grams);