Ratio constructor
Constructs a new Ratio with optional numerator and denominator.
Implementation
Ratio({
Quantity? numerator,
Quantity? denominator,
}) : this.fromJson(
JsonObject({
if (numerator != null) numeratorField.name: numerator.json,
if (denominator != null) denominatorField.name: denominator.json,
}),
);