Skip to content

Commit 1929421

Browse files
committed
Default post type
1 parent de2ff43 commit 1929421

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

lib/flutter_wordpress.dart

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -255,15 +255,9 @@ class WordPress {
255255
bool fetchTags = false,
256256
bool fetchFeaturedMedia = false,
257257
bool fetchAttachments = false,
258-
String postType,
258+
String postType = "posts",
259259
}) async {
260-
StringBuffer url;
261-
262-
if (postType != null) {
263-
url = new StringBuffer(_baseUrl + URL_WP_BASE + "/" + postType);
264-
} else {
265-
url = new StringBuffer(_baseUrl + URL_POSTS);
266-
}
260+
final StringBuffer url = new StringBuffer(_baseUrl + URL_WP_BASE + "/" + postType);
267261

268262
url.write(postParams.toString());
269263

0 commit comments

Comments
 (0)