dco_decode_quality_thresholds method

  1. @protected
QualityThresholds dco_decode_quality_thresholds(
  1. dynamic raw
)
override

Implementation

@protected
QualityThresholds dco_decode_quality_thresholds(dynamic raw) {
  // Codec=Dco (DartCObject based), see doc to use other codecs
  final arr = raw as List<dynamic>;
  if (arr.length != 5)
    throw Exception('unexpected arr length: expect 5 but see ${arr.length}');
  return QualityThresholds(
    excellent: dco_decode_u_64(arr[0]),
    great: dco_decode_u_64(arr[1]),
    good: dco_decode_u_64(arr[2]),
    moderate: dco_decode_u_64(arr[3]),
    poor: dco_decode_u_64(arr[4]),
  );
}