GetEventPredictionResult.fromJson constructor

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

Implementation

factory GetEventPredictionResult.fromJson(Map<String, dynamic> json) {
  return GetEventPredictionResult(
    modelScores: (json['modelScores'] as List?)
        ?.whereNotNull()
        .map((e) => ModelScores.fromJson(e as Map<String, dynamic>))
        .toList(),
    ruleResults: (json['ruleResults'] as List?)
        ?.whereNotNull()
        .map((e) => RuleResult.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}