Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ final class ImagenGenerationResponse<T extends ImagenImage> {
/// Factory method to create an [ImagenGenerationResponse] from a JSON object.
factory ImagenGenerationResponse.fromJson(Map<String, dynamic> json) {
final predictions = json['predictions'];
if (predictions.isEmpty) {
if (predictions == null || predictions.isEmpty) {
throw ServerException('Got empty prediction with no reason');
}

Expand Down
Loading