Replace `type_` with `type`
This commit is contained in:
parent
4a096602b5
commit
be3bd569f4
|
@ -10,14 +10,15 @@ part 'search.g.dart';
|
|||
/// based on https://dev.lemmy.ml/docs/contributing_websocket_http_api.html#search
|
||||
@JsonSerializable(createToJson: false)
|
||||
class Search {
|
||||
final String type_;
|
||||
@JsonKey(name: "type_")
|
||||
final String type;
|
||||
final List<CommentView> comments;
|
||||
final List<PostView> posts;
|
||||
final List<CommunityView> communities;
|
||||
final List<UserView> users;
|
||||
|
||||
const Search({
|
||||
this.type_,
|
||||
this.type,
|
||||
this.comments,
|
||||
this.posts,
|
||||
this.communities,
|
||||
|
|
|
@ -8,7 +8,7 @@ part of 'search.dart';
|
|||
|
||||
Search _$SearchFromJson(Map<String, dynamic> json) {
|
||||
return Search(
|
||||
type_: json['type_'] as String,
|
||||
type: json['type_'] as String,
|
||||
comments: (json['comments'] as List)
|
||||
?.map((e) =>
|
||||
e == null ? null : CommentView.fromJson(e as Map<String, dynamic>))
|
||||
|
|
Loading…
Reference in New Issue