ModelScores.fromJson constructor

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

Implementation

factory ModelScores.fromJson(Map<String, dynamic> json) {
  return ModelScores(
    modelVersion: json['modelVersion'] != null
        ? ModelVersion.fromJson(json['modelVersion'] as Map<String, dynamic>)
        : null,
    scores: (json['scores'] as Map<String, dynamic>?)
        ?.map((k, e) => MapEntry(k, e as double)),
  );
}