ProtectiveEquipmentBodyPart.fromJson constructor

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

Implementation

factory ProtectiveEquipmentBodyPart.fromJson(Map<String, dynamic> json) {
  return ProtectiveEquipmentBodyPart(
    confidence: json['Confidence'] as double?,
    equipmentDetections: (json['EquipmentDetections'] as List?)
        ?.whereNotNull()
        .map((e) => EquipmentDetection.fromJson(e as Map<String, dynamic>))
        .toList(),
    name: (json['Name'] as String?)?.toBodyPart(),
  );
}