We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de2ff43 commit 1929421Copy full SHA for 1929421
1 file changed
lib/flutter_wordpress.dart
@@ -255,15 +255,9 @@ class WordPress {
255
bool fetchTags = false,
256
bool fetchFeaturedMedia = false,
257
bool fetchAttachments = false,
258
- String postType,
+ String postType = "posts",
259
}) 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
- }
+ final StringBuffer url = new StringBuffer(_baseUrl + URL_WP_BASE + "/" + postType);
267
268
url.write(postParams.toString());
269
0 commit comments