Created
July 31, 2019 14:31
-
-
Save agarasul/f280915e40fd7c2d33f8833c8432adda to your computer and use it in GitHub Desktop.
This file contains 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 Article { | |
Source source; | |
String author; | |
Article.fromJson(Map<String, dynamic> articleJson) | |
: source = Source.fromJson(articleJson['source']), | |
author = articleJson['author'] | |
} | |
class Source { | |
String id; | |
String name; | |
Source.fromJson(Map<String, dynamic> sourceJson) | |
: id = sourceJson['id'], | |
name = sourceJson['name']; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment