Label.fromJson constructor

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

Implementation

factory Label.fromJson(Map<String, dynamic> json) {
  return Label(
    confidence: json['Confidence'] as double?,
    instances: (json['Instances'] as List?)
        ?.whereNotNull()
        .map((e) => Instance.fromJson(e as Map<String, dynamic>))
        .toList(),
    name: json['Name'] as String?,
    parents: (json['Parents'] as List?)
        ?.whereNotNull()
        .map((e) => Parent.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}