Skip to content

Commit ecaf6e0

Browse files
committed
Fix dart/flutter to string
1 parent 3b12eb5 commit ecaf6e0

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

templates/dart/lib/query.dart.twig

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -34,90 +34,90 @@ class Query {
3434
/// the query will return resources where [attribute] is equal
3535
/// to any of the values in the list.
3636
static String equal(String attribute, dynamic value) =>
37-
Query._('equal', attribute, value).toJson();
37+
Query._('equal', attribute, value).toString();
3838

3939
/// Filter resources where [attribute] is not equal to [value].
4040
static String notEqual(String attribute, dynamic value) =>
41-
Query._('notEqual', attribute, [value]).toJson();
41+
Query._('notEqual', attribute, [value]).toString();
4242

4343
/// Filter resources where [attribute] is less than [value].
4444
static String lessThan(String attribute, dynamic value) =>
45-
Query._('lessThan', attribute, value).toJson();
45+
Query._('lessThan', attribute, value).toString();
4646

4747
/// Filter resources where [attribute] is less than or equal to [value].
4848
static String lessThanEqual(String attribute, dynamic value) =>
49-
Query._('lessThanEqual', attribute, value).toJson();
49+
Query._('lessThanEqual', attribute, value).toString();
5050

5151
/// Filter resources where [attribute] is greater than [value].
5252
static String greaterThan(String attribute, dynamic value) =>
53-
Query._('greaterThan', attribute, value).toJson();
53+
Query._('greaterThan', attribute, value).toString();
5454

5555
/// Filter resources where [attribute] is greater than or equal to [value].
5656
static String greaterThanEqual(String attribute, dynamic value) =>
57-
Query._('greaterThanEqual', attribute, value).toJson();
57+
Query._('greaterThanEqual', attribute, value).toString();
5858

5959
/// Filter resources where by searching [attribute] for [value].
6060
static String search(String attribute, String value) =>
61-
Query._('search', attribute, value).toJson();
61+
Query._('search', attribute, value).toString();
6262

6363
/// Filter resources where [attribute] is null.
64-
static String isNull(String attribute) => Query._('isNull', attribute).toJson();
64+
static String isNull(String attribute) => Query._('isNull', attribute).toString();
6565

6666
/// Filter resources where [attribute] is not null.
67-
static String isNotNull(String attribute) => Query._('isNotNull', attribute).toJson();
67+
static String isNotNull(String attribute) => Query._('isNotNull', attribute).toString();
6868

6969
/// Filter resources where [attribute] is between [start] and [end] (inclusive).
7070
static String between(String attribute, dynamic start, dynamic end) =>
71-
Query._('between', attribute, [start, end]).toJson();
71+
Query._('between', attribute, [start, end]).toString();
7272

7373
/// Filter resources where [attribute] starts with [value].
7474
static String startsWith(String attribute, String value) =>
75-
Query._('startsWith', attribute, value).toJson();
75+
Query._('startsWith', attribute, value).toString();
7676

7777
/// Filter resources where [attribute] ends with [value].
7878
static String endsWith(String attribute, String value) =>
79-
Query._('endsWith', attribute, value).toJson();
79+
Query._('endsWith', attribute, value).toString();
8080

8181
/// Filter resources where [attribute] contains [value]
8282
/// [value] can be a single value or a list.
8383
static String contains(String attribute, dynamic value) =>
84-
Query._('contains', attribute, value).toJson();
84+
Query._('contains', attribute, value).toString();
8585

8686
static String or(List<String> queries) =>
87-
Query._('and', null, queries.map((query) => jsonDecode(query)).toList()).toJson();
87+
Query._('and', null, queries.map((query) => jsonDecode(query)).toList()).toString();
8888

8989
static String and(List<String> queries) =>
90-
Query._('and', null, queries.map((query) => jsonDecode(query)).toList()).toJson();
90+
Query._('and', null, queries.map((query) => jsonDecode(query)).toList()).toString();
9191

9292
/// Specify which attributes should be returned by the API call.
9393
static String select(List<String> attributes) =>
94-
Query._('select', null, attributes).toJson();
94+
Query._('select', null, attributes).toString();
9595

9696
/// Sort results by [attribute] ascending.
97-
static String orderAsc(String attribute) => Query._('orderAsc', attribute).toJson();
97+
static String orderAsc(String attribute) => Query._('orderAsc', attribute).toString();
9898

9999
/// Sort results by [attribute] descending.
100-
static String orderDesc(String attribute) => Query._('orderDesc', attribute).toJson();
100+
static String orderDesc(String attribute) => Query._('orderDesc', attribute).toString();
101101

102102
/// Return results before [id].
103103
///
104104
/// Refer to the [Cursor Based Pagination]({{sdk.url}}/docs/pagination#cursor-pagination)
105105
/// docs for more information.
106-
static String cursorBefore(String id) => Query._('cursorBefore', null, id).toJson();
106+
static String cursorBefore(String id) => Query._('cursorBefore', null, id).toString();
107107

108108
/// Return results after [id].
109109
///
110110
/// Refer to the [Cursor Based Pagination]({{sdk.url}}/docs/pagination#cursor-pagination)
111111
/// docs for more information.
112-
static String cursorAfter(String id) => Query._('cursorAfter', null, id).toJson();
112+
static String cursorAfter(String id) => Query._('cursorAfter', null, id).toString();
113113

114114
/// Return only [limit] results.
115-
static String limit(int limit) => Query._('limit', null, limit).toJson();
115+
static String limit(int limit) => Query._('limit', null, limit).toString();
116116

117117
/// Return results from [offset].
118118
///
119119
/// Refer to the [Offset Pagination]({{sdk.url}}/docs/pagination#offset-pagination)
120120
/// docs for more information.
121-
static String offset(int offset) => Query._('offset', null, offset).toJson();
121+
static String offset(int offset) => Query._('offset', null, offset).toString();
122122

123123
}

0 commit comments

Comments
 (0)