SearchResponse.fromJson constructor

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

Implementation

factory SearchResponse.fromJson(Map<String, dynamic> json) {
  return SearchResponse(
    nextToken: json['NextToken'] as String?,
    results: (json['Results'] as List?)
        ?.whereNotNull()
        .map((e) => SearchRecord.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}