fix(bb): username get

This commit is contained in:
Rongjian Zhang
2020-02-02 19:06:48 +08:00
parent 7f2649c691
commit 376b8724a4
4 changed files with 7 additions and 6 deletions

View File

@@ -50,6 +50,7 @@ class BbRepo {
String slug;
BbRepoMainbranch mainbranch;
Map<String, dynamic> links;
String get ownerLogin => fullName.split('/')[0]; // owner has no username
String get avatarUrl => links['avatar']['href'];
BbRepo();
factory BbRepo.fromJson(Map<String, dynamic> json) => _$BbRepoFromJson(json);