BatchGetImageResponse.fromJson constructor

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

Implementation

factory BatchGetImageResponse.fromJson(Map<String, dynamic> json) {
  return BatchGetImageResponse(
    failures: (json['failures'] as List?)
        ?.whereNotNull()
        .map((e) => ImageFailure.fromJson(e as Map<String, dynamic>))
        .toList(),
    images: (json['images'] as List?)
        ?.whereNotNull()
        .map((e) => Image.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}