Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/requests/params_post_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class ParamsPostList {
final List<int> includeTags;
final List<int> excludeTags;
final bool? sticky;
final List<String> fields;

ParamsPostList({
this.context = WordPressContext.view,
Expand All @@ -47,6 +48,7 @@ class ParamsPostList {
this.includeTags = const [],
this.excludeTags = const [],
this.sticky,
this.fields = const [],
});

Map<String, String> toMap() {
Expand All @@ -71,6 +73,7 @@ class ParamsPostList {
'tags': '${listToUrlString(includeTags)}',
'tags_exclude': '${listToUrlString(excludeTags)}',
'sticky': '${this.sticky == null ? '' : this.sticky}',
'_fields': this.fields.join(',')
};
}

Expand Down Expand Up @@ -98,7 +101,8 @@ ParamsPostList copyWith({
postStatus: postStatus,
searchQuery: searchQuery,
slug: slug,
sticky: sticky
sticky: sticky,
fields: fields,
);
}

Expand Down