fromJson static method

  1. @visibleForTesting
ImageQualityCharacteristic? fromJson(
  1. dynamic jsonObject
)

Implementation

@visibleForTesting
static ImageQualityCharacteristic? fromJson(jsonObject) {
  if (jsonObject == null) return null;

  return ImageQualityCharacteristic._create(
    ImageQualityCharacteristicName.getByValue(
        jsonObject["characteristicName"])!,
    recommended: ImageQualityRange.fromJson(jsonObject["recommendedRange"]),
    custom: ImageQualityRange.fromJson(jsonObject["customRange"]),
    color: _intToColor(jsonObject["color"]),
  );
}