added missing commas and removed codegen files
This commit is contained in:
parent
b829b30593
commit
f4f6ddd8fe
|
@ -53,36 +53,36 @@ class CommentView {
|
|||
|
||||
const CommentView({
|
||||
this.id,
|
||||
this.creatorId
|
||||
this.creatorId,
|
||||
this.postId,
|
||||
this.postName,
|
||||
this.parentId,
|
||||
this.content
|
||||
this.removed
|
||||
this.content,
|
||||
this.removed,
|
||||
this.read,
|
||||
this.published
|
||||
this.updated
|
||||
this.deleted
|
||||
this.published,
|
||||
this.updated,
|
||||
this.deleted,
|
||||
this.apId,
|
||||
this.local
|
||||
this.communityId
|
||||
this.local,
|
||||
this.communityId,
|
||||
this.communityActorId,
|
||||
this.communityLocal,
|
||||
this.communityName
|
||||
this.communityIcon
|
||||
this.communityName,
|
||||
this.communityIcon,
|
||||
this.banned,
|
||||
this.bannedFromCommunity
|
||||
this.bannedFromCommunity,
|
||||
this.creatorActorId,
|
||||
this.creatorLocal,
|
||||
this.creatorName
|
||||
this.creatorName,
|
||||
this.creatorPreferredUsername,
|
||||
this.creatorPublished,
|
||||
this.creatorAvatar
|
||||
this.score
|
||||
this.upvotes
|
||||
this.downvotes
|
||||
this.hotRank
|
||||
this.hotRankActive
|
||||
this.creatorAvatar,
|
||||
this.score,
|
||||
this.upvotes,
|
||||
this.downvotes,
|
||||
this.hotRank,
|
||||
this.hotRankActive,
|
||||
this.userId,
|
||||
this.myVote,
|
||||
this.subscribed,
|
||||
|
|
|
@ -1,80 +0,0 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'comment.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
CommentView _$CommentViewFromJson(Map<String, dynamic> json) {
|
||||
return CommentView(
|
||||
json['id'] as int,
|
||||
json['creator_id'] as int,
|
||||
json['post_id'] as int,
|
||||
json['post_name'] as String,
|
||||
json['parent_id'] as int,
|
||||
json['content'] as String,
|
||||
json['removed'] as bool,
|
||||
json['read'] as bool,
|
||||
UtilityClass.ParseDateFromJson(json['published'] as String),
|
||||
UtilityClass.ParseDateFromJson(json['updated'] as String),
|
||||
json['deleted'] as bool,
|
||||
json['ap_id'] as String,
|
||||
json['local'] as bool,
|
||||
json['community_id'] as int,
|
||||
json['community_actor_id'] as String,
|
||||
json['community_local'] as bool,
|
||||
json['community_name'] as String,
|
||||
json['banned'] as bool,
|
||||
json['banned_from_community'] as bool,
|
||||
json['creator_actor_id'] as String,
|
||||
json['creator_local'] as bool,
|
||||
json['creator_name'] as String,
|
||||
UtilityClass.ParseDateFromJson(json['creator_published'] as String),
|
||||
json['creator_avatar'] as String,
|
||||
json['score'] as int,
|
||||
json['upvotes'] as int,
|
||||
json['downvotes'] as int,
|
||||
json['hot_rank'] as int,
|
||||
json['userId'] as int,
|
||||
json['myVote'] as int,
|
||||
json['subscribed'] as bool,
|
||||
json['saved'] as bool,
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$CommentViewToJson(CommentView instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'creator_id': instance.creatorId,
|
||||
'post_id': instance.postId,
|
||||
'post_name': instance.postName,
|
||||
'parent_id': instance.parentId,
|
||||
'content': instance.content,
|
||||
'removed': instance.removed,
|
||||
'read': instance.read,
|
||||
'published': instance.published?.toIso8601String(),
|
||||
'updated': instance.updated?.toIso8601String(),
|
||||
'deleted': instance.deleted,
|
||||
'ap_id': instance.apId,
|
||||
'local': instance.local,
|
||||
'community_id': instance.communityId,
|
||||
'community_actor_id': instance.communityActorId,
|
||||
'community_local': instance.communityLocal,
|
||||
'community_name': instance.communityName,
|
||||
'banned': instance.banned,
|
||||
'banned_from_community': instance.bannedFromCommunity,
|
||||
'creator_actor_id': instance.creatorActorId,
|
||||
'creator_local': instance.creatorLocal,
|
||||
'creator_name': instance.creatorName,
|
||||
'creator_published': instance.creatorPublished?.toIso8601String(),
|
||||
'creator_avatar': instance.creatorAvatar,
|
||||
'score': instance.score,
|
||||
'upvotes': instance.upvotes,
|
||||
'downvotes': instance.downvotes,
|
||||
'hot_rank': instance.hotRank,
|
||||
'userId': instance.userId,
|
||||
'myVote': instance.myVote,
|
||||
'subscribed': instance.subscribed,
|
||||
'saved': instance.saved,
|
||||
};
|
|
@ -68,7 +68,7 @@ class PostView {
|
|||
/// can be null
|
||||
final bool saved;
|
||||
|
||||
PostView({
|
||||
const PostView({
|
||||
this.id,
|
||||
this.name,
|
||||
this.url,
|
||||
|
|
|
@ -1,101 +0,0 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'post.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
PostView _$PostViewFromJson(Map<String, dynamic> json) {
|
||||
return PostView(
|
||||
json['id'] as int,
|
||||
json['name'] as String,
|
||||
json['url'] as String,
|
||||
json['body'] as String,
|
||||
json['creator_id'] as int,
|
||||
json['community_id'] as int,
|
||||
json['removed'] as bool,
|
||||
json['locked'] as bool,
|
||||
UtilityClass.ParseDateFromJson(json['published'] as String),
|
||||
UtilityClass.ParseDateFromJson(json['updated'] as String),
|
||||
json['deleted'] as bool,
|
||||
json['nsfw'] as bool,
|
||||
json['stickied'] as bool,
|
||||
json['embed_title'] as String,
|
||||
json['embed_description'] as String,
|
||||
json['embed_html'] as String,
|
||||
json['thumbnail_url'] as String,
|
||||
json['ap_id'] as String,
|
||||
json['local'] as bool,
|
||||
json['creator_actor_id'] as String,
|
||||
json['creator_local'] as bool,
|
||||
json['creator_name'] as String,
|
||||
UtilityClass.ParseDateFromJson(json['creator_published'] as String),
|
||||
json['creator_avatar'] as String,
|
||||
json['banned'] as bool,
|
||||
json['banned_from_community'] as bool,
|
||||
json['community_actor_id'] as String,
|
||||
json['community_local'] as bool,
|
||||
json['community_name'] as String,
|
||||
json['community_removed'] as bool,
|
||||
json['community_deleted'] as bool,
|
||||
json['community_nsfw'] as bool,
|
||||
json['number_of_comments'] as int,
|
||||
json['score'] as int,
|
||||
json['upvotes'] as int,
|
||||
json['downvotes'] as int,
|
||||
json['hot_rank'] as int,
|
||||
UtilityClass.ParseDateFromJson(json['newest_activity_time'] as String),
|
||||
json['userId'] as int,
|
||||
json['myVote'] as int,
|
||||
json['subscribed'] as bool,
|
||||
json['read'] as bool,
|
||||
json['saved'] as bool,
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$PostViewToJson(PostView instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.postName,
|
||||
'url': instance.url,
|
||||
'body': instance.body,
|
||||
'creator_id': instance.creatorId,
|
||||
'community_id': instance.communityId,
|
||||
'removed': instance.removed,
|
||||
'locked': instance.locked,
|
||||
'published': instance.published?.toIso8601String(),
|
||||
'updated': instance.updated?.toIso8601String(),
|
||||
'deleted': instance.deleted,
|
||||
'nsfw': instance.nsfw,
|
||||
'stickied': instance.stickied,
|
||||
'embed_title': instance.embedTitle,
|
||||
'embed_description': instance.embedDescription,
|
||||
'embed_html': instance.embedHtml,
|
||||
'thumbnail_url': instance.thumbnailUrl,
|
||||
'ap_id': instance.apId,
|
||||
'local': instance.local,
|
||||
'creator_actor_id': instance.creatorActorId,
|
||||
'creator_local': instance.creatorLocal,
|
||||
'creator_name': instance.creatorName,
|
||||
'creator_published': instance.creatorPublished?.toIso8601String(),
|
||||
'creator_avatar': instance.creatorAvatar,
|
||||
'banned': instance.banned,
|
||||
'banned_from_community': instance.bannedFromCommunity,
|
||||
'community_actor_id': instance.communityActorId,
|
||||
'community_local': instance.communityLocal,
|
||||
'community_name': instance.communityName,
|
||||
'community_removed': instance.communityRemoved,
|
||||
'community_deleted': instance.communityDeleted,
|
||||
'community_nsfw': instance.communityNsfw,
|
||||
'number_of_comments': instance.numberOfComments,
|
||||
'score': instance.score,
|
||||
'upvotes': instance.upvotes,
|
||||
'downvotes': instance.downvotes,
|
||||
'hot_rank': instance.hotRank,
|
||||
'newest_activity_time': instance.newestActivityTime?.toIso8601String(),
|
||||
'userId': instance.userId,
|
||||
'myVote': instance.myVote,
|
||||
'subscribed': instance.subscribed,
|
||||
'read': instance.read,
|
||||
'saved': instance.saved,
|
||||
};
|
Loading…
Reference in New Issue