@@ -14,9 +14,9 @@ typedef dynamic _Mapper(dynamic e);
14
14
* - **a string**: a string containing an expression, such as "user.lastName", used to order the list.
15
15
* - **a custom callable expression**: an expression that will be called to transform the element
16
16
* before a sort.
17
- * - **a list **: the list may consist of either strings or callable expressions. A list expression
18
- * indicates a list of fallback expressions to use when a comparison results in the items
19
- * being equal.
17
+ * - **an [Iterable] **: it may consist of either strings or callable expressions. A list expression
18
+ * indicates a list of fallback expressions to use when a comparison results in the items being
19
+ * equal.
20
20
*
21
21
* If the expression is explicitly empty(`orderBy:''` ), the elements are sorted in
22
22
* ascending order, using the default comparator, `+` .
@@ -26,8 +26,8 @@ typedef dynamic _Mapper(dynamic e);
26
26
* - `+` : sort the elements in ascending order. This is the default.
27
27
* - `-` : sort the elements in descending order.
28
28
*
29
- * Alternately, by appending `true` , you can set "descending order" to true, which has the same effect as the `-`
30
- * prefix.
29
+ * Alternately, by appending `true` , you can set "descending order" to true, which has the same
30
+ * effect as the `-` prefix.
31
31
*
32
32
* # Examples
33
33
*
@@ -174,6 +174,8 @@ class OrderBy implements Function {
174
174
expressions = [expression];
175
175
} else if (expression is List ) {
176
176
expressions = expression as List ;
177
+ } else if (expression is Iterable ) {
178
+ expressions = expression.toList ();
177
179
}
178
180
if (expressions == null || expressions.length == 0 ) {
179
181
// AngularJS behavior. You must have an expression to get any work done.
0 commit comments