toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final units = this.units;
  final value = this.value;
  return {
    'units': units.toValue(),
    'value': value,
  };
}