EquipmentDetection.fromJson constructor

EquipmentDetection.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory EquipmentDetection.fromJson(Map<String, dynamic> json) {
  return EquipmentDetection(
    boundingBox: json['BoundingBox'] != null
        ? BoundingBox.fromJson(json['BoundingBox'] as Map<String, dynamic>)
        : null,
    confidence: json['Confidence'] as double?,
    coversBodyPart: json['CoversBodyPart'] != null
        ? CoversBodyPart.fromJson(
            json['CoversBodyPart'] as Map<String, dynamic>)
        : null,
    type: (json['Type'] as String?)?.toProtectiveEquipmentType(),
  );
}