ListRecipesResponse.fromJson constructor

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

Implementation

factory ListRecipesResponse.fromJson(Map<String, dynamic> json) {
  return ListRecipesResponse(
    nextToken: json['nextToken'] as String?,
    recipes: (json['recipes'] as List?)
        ?.whereNotNull()
        .map((e) => RecipeSummary.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}