ProtectiveEquipmentPerson.fromJson constructor

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

Implementation

factory ProtectiveEquipmentPerson.fromJson(Map<String, dynamic> json) {
  return ProtectiveEquipmentPerson(
    bodyParts: (json['BodyParts'] as List?)
        ?.whereNotNull()
        .map((e) =>
            ProtectiveEquipmentBodyPart.fromJson(e as Map<String, dynamic>))
        .toList(),
    boundingBox: json['BoundingBox'] != null
        ? BoundingBox.fromJson(json['BoundingBox'] as Map<String, dynamic>)
        : null,
    confidence: json['Confidence'] as double?,
    id: json['Id'] as int?,
  );
}