GitHostRepo: Add name and username

Instead of having to parse this from the fullName. This way the code is
easier to read and it's more reliable.
This commit is contained in:
Vishesh Handa
2020-11-13 15:36:24 +01:00
parent 819702bc6c
commit df78b24542
4 changed files with 36 additions and 13 deletions

View File

@ -28,6 +28,8 @@ class UserInfo {
}
class GitHostRepo {
final String name;
final String username;
final String fullName;
final String description;
@ -44,6 +46,8 @@ class GitHostRepo {
final List<String> tags;
GitHostRepo({
@required this.name,
@required this.username,
@required this.fullName,
@required this.description,
@required this.cloneUrl,
@ -58,6 +62,8 @@ class GitHostRepo {
});
Map<String, dynamic> toJson() => {
'name': name,
'username': username,
'fullName': fullName,
'description': description,
'cloneUrl': cloneUrl,