Created
January 13, 2020 16:13
-
-
Save azamsharp/a24594f7e4695e751d3f3b623194c0eb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class NewsArticle { | |
final String title; | |
final String publication; | |
final String imageURL; | |
NewsArticle({this.title, this.publication, this.imageURL}); | |
factory NewsArticle.fromJson(Map<String, dynamic> json) { | |
return NewsArticle( | |
title: json["title"], | |
publication: json["publication"], | |
imageURL: json["imageURL"] | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment