toJson method

Map<String, dynamic> toJson()

Converts the instance to a JSON map.

Implementation

Map<String, dynamic> toJson() {
  return {
    'unit': unit,
    'numerator': numerator,
    'denominator': denominator,
  };
}