forked from lxm_flutter/FlutterUnit
🎨 改进代码结构
This commit is contained in:
@@ -55,22 +55,22 @@ GithubUser _$UserFromJson(Map<String, dynamic> json) {
|
||||
Map<String, dynamic> _$UserToJson(GithubUser instance) => <String, dynamic>{
|
||||
'login': instance.login,
|
||||
'id': instance.id,
|
||||
'node_id': instance.node_id,
|
||||
'avatar_url': instance.avatar_url,
|
||||
'gravatar_id': instance.gravatar_id,
|
||||
'node_id': instance.nodeId,
|
||||
'avatar_url': instance.avatarUrl,
|
||||
'gravatar_id': instance.gravatarId,
|
||||
'url': instance.url,
|
||||
'html_url': instance.html_url,
|
||||
'followers_url': instance.followers_url,
|
||||
'following_url': instance.following_url,
|
||||
'gists_url': instance.gists_url,
|
||||
'starred_url': instance.starred_url,
|
||||
'subscriptions_url': instance.subscriptions_url,
|
||||
'organizations_url': instance.organizations_url,
|
||||
'repos_url': instance.repos_url,
|
||||
'events_url': instance.events_url,
|
||||
'received_events_url': instance.received_events_url,
|
||||
'html_url': instance.htmlUrl,
|
||||
'followers_url': instance.followersUrl,
|
||||
'following_url': instance.followingUrl,
|
||||
'gists_url': instance.gistsUrl,
|
||||
'starred_url': instance.starredUrl,
|
||||
'subscriptions_url': instance.subscriptionsUrl,
|
||||
'organizations_url': instance.organizationsUrl,
|
||||
'repos_url': instance.reposUrl,
|
||||
'events_url': instance.eventsUrl,
|
||||
'received_events_url': instance.receivedEventsUrl,
|
||||
'type': instance.type,
|
||||
'site_admin': instance.site_admin,
|
||||
'site_admin': instance.siteAdmin,
|
||||
'name': instance.name,
|
||||
'company': instance.company,
|
||||
'blog': instance.blog,
|
||||
@@ -78,16 +78,16 @@ Map<String, dynamic> _$UserToJson(GithubUser instance) => <String, dynamic>{
|
||||
'email': instance.email,
|
||||
'starred': instance.starred,
|
||||
'bio': instance.bio,
|
||||
'public_repos': instance.public_repos,
|
||||
'public_gists': instance.public_gists,
|
||||
'public_repos': instance.publicRepos,
|
||||
'public_gists': instance.publicGists,
|
||||
'followers': instance.followers,
|
||||
'following': instance.following,
|
||||
'created_at': instance.created_at?.toIso8601String(),
|
||||
'updated_at': instance.updated_at?.toIso8601String(),
|
||||
'private_gists': instance.private_gists,
|
||||
'total_private_repos': instance.total_private_repos,
|
||||
'owned_private_repos': instance.owned_private_repos,
|
||||
'disk_usage': instance.disk_usage,
|
||||
'created_at': instance.createdAt?.toIso8601String(),
|
||||
'updated_at': instance.updatedAt?.toIso8601String(),
|
||||
'private_gists': instance.privateGists,
|
||||
'total_private_repos': instance.totalPrivateRepos,
|
||||
'owned_private_repos': instance.ownedPrivateRepos,
|
||||
'disk_usage': instance.diskUsage,
|
||||
'collaborators': instance.collaborators,
|
||||
'two_factor_authentication': instance.two_factor_authentication,
|
||||
'two_factor_authentication': instance.twoFactorAuthentication,
|
||||
};
|
||||
|
||||
@@ -8,22 +8,22 @@ class GithubUser {
|
||||
GithubUser(
|
||||
this.login,
|
||||
this.id,
|
||||
this.node_id,
|
||||
this.avatar_url,
|
||||
this.gravatar_id,
|
||||
this.nodeId,
|
||||
this.avatarUrl,
|
||||
this.gravatarId,
|
||||
this.url,
|
||||
this.html_url,
|
||||
this.followers_url,
|
||||
this.following_url,
|
||||
this.gists_url,
|
||||
this.starred_url,
|
||||
this.subscriptions_url,
|
||||
this.organizations_url,
|
||||
this.repos_url,
|
||||
this.events_url,
|
||||
this.received_events_url,
|
||||
this.htmlUrl,
|
||||
this.followersUrl,
|
||||
this.followingUrl,
|
||||
this.gistsUrl,
|
||||
this.starredUrl,
|
||||
this.subscriptionsUrl,
|
||||
this.organizationsUrl,
|
||||
this.reposUrl,
|
||||
this.eventsUrl,
|
||||
this.receivedEventsUrl,
|
||||
this.type,
|
||||
this.site_admin,
|
||||
this.siteAdmin,
|
||||
this.name,
|
||||
this.company,
|
||||
this.blog,
|
||||
@@ -31,37 +31,37 @@ class GithubUser {
|
||||
this.email,
|
||||
this.starred,
|
||||
this.bio,
|
||||
this.public_repos,
|
||||
this.public_gists,
|
||||
this.publicRepos,
|
||||
this.publicGists,
|
||||
this.followers,
|
||||
this.following,
|
||||
this.created_at,
|
||||
this.updated_at,
|
||||
this.private_gists,
|
||||
this.total_private_repos,
|
||||
this.owned_private_repos,
|
||||
this.disk_usage,
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
this.privateGists,
|
||||
this.totalPrivateRepos,
|
||||
this.ownedPrivateRepos,
|
||||
this.diskUsage,
|
||||
this.collaborators,
|
||||
this.two_factor_authentication);
|
||||
this.twoFactorAuthentication);
|
||||
|
||||
String login;
|
||||
int id;
|
||||
String node_id;
|
||||
String avatar_url;
|
||||
String gravatar_id;
|
||||
String nodeId;
|
||||
String avatarUrl;
|
||||
String gravatarId;
|
||||
String url;
|
||||
String html_url;
|
||||
String followers_url;
|
||||
String following_url;
|
||||
String gists_url;
|
||||
String starred_url;
|
||||
String subscriptions_url;
|
||||
String organizations_url;
|
||||
String repos_url;
|
||||
String events_url;
|
||||
String received_events_url;
|
||||
String htmlUrl;
|
||||
String followersUrl;
|
||||
String followingUrl;
|
||||
String gistsUrl;
|
||||
String starredUrl;
|
||||
String subscriptionsUrl;
|
||||
String organizationsUrl;
|
||||
String reposUrl;
|
||||
String eventsUrl;
|
||||
String receivedEventsUrl;
|
||||
String type;
|
||||
bool site_admin;
|
||||
bool siteAdmin;
|
||||
String name;
|
||||
String company;
|
||||
String blog;
|
||||
@@ -69,18 +69,18 @@ class GithubUser {
|
||||
String email;
|
||||
String starred;
|
||||
String bio;
|
||||
int public_repos;
|
||||
int public_gists;
|
||||
int publicRepos;
|
||||
int publicGists;
|
||||
int followers;
|
||||
int following;
|
||||
DateTime created_at;
|
||||
DateTime updated_at;
|
||||
int private_gists;
|
||||
int total_private_repos;
|
||||
int owned_private_repos;
|
||||
int disk_usage;
|
||||
DateTime createdAt;
|
||||
DateTime updatedAt;
|
||||
int privateGists;
|
||||
int totalPrivateRepos;
|
||||
int ownedPrivateRepos;
|
||||
int diskUsage;
|
||||
int collaborators;
|
||||
bool two_factor_authentication;
|
||||
bool twoFactorAuthentication;
|
||||
|
||||
|
||||
factory GithubUser.fromJson(Map<String, dynamic> json) => _$UserFromJson(json);
|
||||
|
||||
@@ -4,30 +4,30 @@ import 'package:flutter_unit/model/github/github_user.dart';
|
||||
part 'g/issue.g.dart';
|
||||
|
||||
class Issue extends Equatable {
|
||||
int id;
|
||||
int number;
|
||||
String title;
|
||||
String state;
|
||||
bool locked;
|
||||
final int id;
|
||||
final int number;
|
||||
final String title;
|
||||
final String state;
|
||||
final bool locked;
|
||||
|
||||
int commentNum;
|
||||
final int commentNum;
|
||||
|
||||
DateTime createdAt;
|
||||
final DateTime createdAt;
|
||||
|
||||
DateTime updatedAt;
|
||||
final DateTime updatedAt;
|
||||
|
||||
DateTime closedAt;
|
||||
String body;
|
||||
final DateTime closedAt;
|
||||
final String body;
|
||||
|
||||
String bodyHtml;
|
||||
final String bodyHtml;
|
||||
|
||||
GithubUser user;
|
||||
final GithubUser user;
|
||||
|
||||
String repoUrl;
|
||||
final String repoUrl;
|
||||
|
||||
String htmlUrl;
|
||||
final String htmlUrl;
|
||||
|
||||
GithubUser closeBy;
|
||||
final GithubUser closeBy;
|
||||
|
||||
Issue(
|
||||
this.id,
|
||||
|
||||
Reference in New Issue
Block a user