Search constructor

  1. @JsonSerializable.new(includeIfNull: false)
const Search({
  1. required String q,
  2. @JsonKey.new(name: 'type_') String? type,
  3. @JsonKey.new(name: 'listing_type') String? listingType,
  4. @JsonKey.new(name: 'community_id') int? communityId,
  5. @JsonKey.new(name: 'community_name') String? communityName,
  6. @JsonKey.new(name: 'creator_id') int? creatorId,
  7. String? sort,
  8. int? page,
  9. int? limit,
  10. String? auth,
})

Implementation

@JsonSerializable(includeIfNull: false)
const factory Search({
  required String q,
  @JsonKey(name: 'type_') String? type, // All, Comments, Posts, Communities, Users, Url
  @JsonKey(name: 'listing_type') String? listingType, // All, Local, Subscribed
  @JsonKey(name: 'community_id') int? communityId,
  @JsonKey(name: 'community_name') String? communityName,
  @JsonKey(name: 'creator_id') int? creatorId,
  String? sort,
  int? page,
  int? limit,
  String? auth,
}) = _Search;