toJson method
Implementation
@visibleForTesting
Map<String, dynamic> toJson() => {
      "characteristicName": _characteristicName.value,
      "recommendedRange": _recommendedRange?.toJson(),
      "customRange": _customRange?.toJson(),
      "color": _intFromColor(_color),
    }.clearNulls();