toJson method

  1. @visibleForTesting
Map<String, dynamic> toJson()

Implementation

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