Created
May 27, 2018 16:16
-
-
Save alfianlosari/655bc6d6740a63febb288921f308d576 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 Repo { | |
final String htmlUrl; | |
final int watchersCount; | |
final String language; | |
final String description; | |
final String name; | |
final String owner; | |
Repo(this.htmlUrl, this.watchersCount, this.language, this.description, | |
this.name, this.owner); | |
static List<Repo> mapJSONStringToList(List<dynamic> jsonList) { | |
return jsonList | |
.map((r) => Repo(r['url'], r['watchers_count'], r['language'], | |
r['description'], r['name'], r['owner']['login'])) | |
.toList(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment