GetRecommendationsResponse.fromJson constructor

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

Implementation

factory GetRecommendationsResponse.fromJson(Map<String, dynamic> json) {
  return GetRecommendationsResponse(
    itemList: (json['itemList'] as List?)
        ?.whereNotNull()
        .map((e) => PredictedItem.fromJson(e as Map<String, dynamic>))
        .toList(),
    recommendationId: json['recommendationId'] as String?,
  );
}