Recommendation.fromJson constructor
Implementation
factory Recommendation.fromJson(Map<String, dynamic> json) {
return Recommendation(
allMatchesCount: json['allMatchesCount'] as int,
allMatchesSum: json['allMatchesSum'] as double,
endTime: nonNullableTimeStampFromJson(json['endTime'] as Object),
pattern: Pattern.fromJson(json['pattern'] as Map<String, dynamic>),
startTime: nonNullableTimeStampFromJson(json['startTime'] as Object),
topMatches: (json['topMatches'] as List)
.whereNotNull()
.map((e) => Match.fromJson(e as Map<String, dynamic>))
.toList(),
);
}