File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -9,17 +9,19 @@ class Query {
99 Query._(this.method, [this.attribute = null, this.values = null]);
1010
1111 Map<String , dynamic > toJson() {
12- final map = <String , dynamic >{'method': method};
13-
12+ final result = <String , dynamic >{};
13+
14+ result['method'] = method;
15+
1416 if(attribute != null) {
15- map ['attribute'] = attribute;
17+ result ['attribute'] = attribute;
1618 }
1719
1820 if(values != null) {
19- map ['values'] = values is List ? values : [values];
21+ result ['values'] = values is List ? values : [values];
2022 }
2123
22- return map ;
24+ return result ;
2325 }
2426
2527 @override
@@ -35,7 +37,7 @@ class Query {
3537
3638 /// Filter resources where [attribute] is not equal to [value].
3739 static String notEqual(String attribute, dynamic value) =>
38- Query._('notEqual', attribute, [ value] ).toString();
40+ Query._('notEqual', attribute, value).toString();
3941
4042 /// Filter resources where [attribute] is less than [value].
4143 static String lessThan(String attribute, dynamic value) =>
You can’t perform that action at this time.
0 commit comments