@@ -130,16 +130,16 @@ class Query {
130130 Query ._('updatedBetween' , null , [start, end]).toString ();
131131
132132 static String or (List <String > queries) => Query ._(
133- 'or' ,
134- null ,
135- queries.map ((query) => jsonDecode (query)).toList (),
136- ).toString ();
133+ 'or' ,
134+ null ,
135+ queries.map ((query) => jsonDecode (query)).toList (),
136+ ).toString ();
137137
138138 static String and (List <String > queries) => Query ._(
139- 'and' ,
140- null ,
141- queries.map ((query) => jsonDecode (query)).toList (),
142- ).toString ();
139+ 'and' ,
140+ null ,
141+ queries.map ((query) => jsonDecode (query)).toList (),
142+ ).toString ();
143143
144144 /// Specify which attributes should be returned by the API call.
145145 static String select (List <String > attributes) =>
@@ -153,6 +153,9 @@ class Query {
153153 static String orderDesc (String attribute) =>
154154 Query ._('orderDesc' , attribute).toString ();
155155
156+ /// Sort results randomly.
157+ static String orderRandom () => Query ._('orderRandom' ).toString ();
158+
156159 /// Return results before [id] .
157160 ///
158161 /// Refer to the [Cursor Based Pagination] (https://appwrite.io/docs/pagination#cursor-pagination)
@@ -179,35 +182,43 @@ class Query {
179182
180183 /// Filter resources where [attribute] is at a specific distance from the given coordinates.
181184 static String distanceEqual (
182- String attribute, List <dynamic > values, num distance,
183- [bool meters = true ]) =>
184- Query ._('distanceEqual' , attribute, [
185- [values, distance, meters]
186- ]).toString ();
185+ String attribute,
186+ List <dynamic > values,
187+ num distance, [
188+ bool meters = true ,
189+ ]) => Query ._('distanceEqual' , attribute, [
190+ [values, distance, meters],
191+ ]).toString ();
187192
188193 /// Filter resources where [attribute] is not at a specific distance from the given coordinates.
189194 static String distanceNotEqual (
190- String attribute, List <dynamic > values, num distance,
191- [bool meters = true ]) =>
192- Query ._('distanceNotEqual' , attribute, [
193- [values, distance, meters]
194- ]).toString ();
195+ String attribute,
196+ List <dynamic > values,
197+ num distance, [
198+ bool meters = true ,
199+ ]) => Query ._('distanceNotEqual' , attribute, [
200+ [values, distance, meters],
201+ ]).toString ();
195202
196203 /// Filter resources where [attribute] is at a distance greater than the specified value from the given coordinates.
197204 static String distanceGreaterThan (
198- String attribute, List <dynamic > values, num distance,
199- [bool meters = true ]) =>
200- Query ._('distanceGreaterThan' , attribute, [
201- [values, distance, meters]
202- ]).toString ();
205+ String attribute,
206+ List <dynamic > values,
207+ num distance, [
208+ bool meters = true ,
209+ ]) => Query ._('distanceGreaterThan' , attribute, [
210+ [values, distance, meters],
211+ ]).toString ();
203212
204213 /// Filter resources where [attribute] is at a distance less than the specified value from the given coordinates.
205214 static String distanceLessThan (
206- String attribute, List <dynamic > values, num distance,
207- [bool meters = true ]) =>
208- Query ._('distanceLessThan' , attribute, [
209- [values, distance, meters]
210- ]).toString ();
215+ String attribute,
216+ List <dynamic > values,
217+ num distance, [
218+ bool meters = true ,
219+ ]) => Query ._('distanceLessThan' , attribute, [
220+ [values, distance, meters],
221+ ]).toString ();
211222
212223 /// Filter resources where [attribute] intersects with the given geometry.
213224 static String intersects (String attribute, List <dynamic > values) =>
0 commit comments