GithubRepoItem.fromJson constructor
The package offers a JSON utility for all model classes.
Implementation
factory GithubRepoItem.fromJson(Map<String, dynamic> json) {
return GithubRepoItem(
owner: json['owner'],
repoName: json['repoName'],
description: json['description'],
programmingLanguage: json['programmingLanguage'],
programmingLanguageColor: json['programmingLanguageColor'],
totalStars: json['totalStars'],
starsSince: json['starsSince'],
totalForks: json['totalForks'],
topContributors: List<GithubUserItem>.from(
json['topContributors']?.map((x) => GithubUserItem.fromJson(x))),
);
}