Mass.fromGrams constructor

const Mass.fromGrams(
  1. double grams
)

Returns a new Mass object from the number of grams.

Implementation

const Mass.fromGrams(double grams) : super(grams * _nanogramsPerGram);