toJson method
The package offers a JSON utility for all model classes.
Implementation
Map<String, dynamic> toJson() {
return {
'owner': owner,
'repoName': repoName,
'description': description,
'programmingLanguage': programmingLanguage,
'programmingLanguageColor': programmingLanguageColor,
'totalStars': totalStars,
'starsSince': starsSince,
'totalForks': totalForks,
'topContributors': topContributors.map((x) => x.toJson()).toList(),
};
}