import 'package:json_annotation/json_annotation.dart'; import './comment.dart'; import './community.dart'; import './post.dart'; import './user.dart'; part 'search.g.dart'; /// based on https://dev.lemmy.ml/docs/contributing_websocket_http_api.html#search @JsonSerializable(createToJson: false) class Search { @JsonKey(name: "type_") final String type; final List comments; final List posts; final List communities; final List users; const Search({ this.type, this.comments, this.posts, this.communities, this.users, }); factory Search.fromJson(Map json) => _$SearchFromJson(json); }