Skip to content

Commit

Permalink
Update news_article.dart
Browse files Browse the repository at this point in the history
  • Loading branch information
AliYar-Khan committed Apr 11, 2021
1 parent 1a71b70 commit 1ef05b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/models/news_article.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ class NewsArticle {
factory NewsArticle.fromJson(Map<String, dynamic> json) {
return NewsArticle(
title: json['title'],
description: json['description'],
description: json['description'] == null ? '' : json['description'],
url: json['url'],
publishedAt: json['publishedAt'],
urlToImage: json['urlToImage']);
urlToImage: json['urlToImage'] == null ? '' : json['urlToImage']);
}


Expand Down

0 comments on commit 1ef05b5

Please sign in to comment.