mirror of
https://github.com/flutter/samples.git
synced 2025-11-09 06:18:49 +00:00
web/github_dataviz: Migrate to null safety (#919)
This commit is contained in:
@@ -8,11 +8,11 @@ class UserContribution {
|
||||
UserContribution(this.user, this.contributions);
|
||||
|
||||
static UserContribution fromJson(Map<String, dynamic> jsonMap) {
|
||||
List<ContributionData> contributionList = (jsonMap["weeks"] as List)
|
||||
List<ContributionData> contributionList = (jsonMap['weeks'] as List)
|
||||
.map((e) => ContributionData.fromJson(e))
|
||||
.toList();
|
||||
var userContribution =
|
||||
UserContribution(User.fromJson(jsonMap["author"]), contributionList);
|
||||
UserContribution(User.fromJson(jsonMap['author']), contributionList);
|
||||
return userContribution;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user