mirror of
https://github.com/pd4d10/git-touch.git
synced 2026-04-28 10:28:58 -05:00
feat: gists screen (#80)
closes: #66 Co-authored-by: Rongjian Zhang <pd4d10@gmail.com>
This commit is contained in:
committed by
GitHub
parent
7a11dca621
commit
094ad4b1bb
@@ -326,13 +326,47 @@ class GithubUserOrganizationItem {
|
||||
_$GithubUserOrganizationItemFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GistFiles {
|
||||
GistFiles({
|
||||
this.filename,
|
||||
this.size,
|
||||
this.rawUrl,
|
||||
this.type,
|
||||
this.language,
|
||||
this.truncated,
|
||||
this.content,
|
||||
});
|
||||
String filename;
|
||||
int size;
|
||||
String rawUrl;
|
||||
String type;
|
||||
String language;
|
||||
bool truncated;
|
||||
String content;
|
||||
|
||||
factory GistFiles.fromJson(Map<String, dynamic> json) =>
|
||||
_$GistFilesFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GithubGistsItem {
|
||||
int id;
|
||||
bool isFork;
|
||||
bool isPublic;
|
||||
String name;
|
||||
String id;
|
||||
String description;
|
||||
bool public;
|
||||
Map<String, GistFiles> files;
|
||||
GithubEventUser owner;
|
||||
List<GistFiles> get fileNames {
|
||||
List<GistFiles> filenames = [];
|
||||
files.forEach((String key, GistFiles value) {
|
||||
filenames.add(value);
|
||||
});
|
||||
return filenames;
|
||||
}
|
||||
|
||||
DateTime createdAt;
|
||||
DateTime updatedAt;
|
||||
|
||||
GithubGistsItem();
|
||||
factory GithubGistsItem.fromJson(Map<String, dynamic> json) =>
|
||||
_$GithubGistsItemFromJson(json);
|
||||
|
||||
Reference in New Issue
Block a user