Skip to content

Commit 971f5bc

Browse files
committed
Fix dart types
1 parent 1e30fde commit 971f5bc

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
@@ -33,91 +33,91 @@ class Query {
3333
/// [value] can be a single value or a list. If a list is used
3434
/// the query will return resources where [attribute] is equal
3535
/// to any of the values in the list.
36-
static string equal(String attribute, dynamic value) =>
36+
static String equal(String attribute, dynamic value) =>
3737
Query._('equal', attribute, value).toJson();
3838

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

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

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

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

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

5959
/// Filter resources where by searching [attribute] for [value].
60-
static string search(String attribute, String value) =>
60+
static String search(String attribute, String value) =>
6161
Query._('search', attribute, value).toJson();
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).toJson();
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).toJson();
6868

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

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

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

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

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

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

9292
/// Specify which attributes should be returned by the API call.
93-
static string select(List<String> attributes) =>
93+
static String select(List<String> attributes) =>
9494
Query._('select', null, attributes).toJson();
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).toJson();
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).toJson();
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).toJson();
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).toJson();
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).toJson();
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).toJson();
122122

123123
}

0 commit comments

Comments
 (0)