toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  if (min != null) {
    json[r'min'] = min;
  }
  if (max != null) {
    json[r'max'] = max;
  }
  if (unit != null) {
    json[r'unit'] = unit;
  }
  return json;
}