Closed
Description
New Issue Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
- I can reproduce the issue with the latest version of Parse Server and the Parse Flutter SDK.
Issue Description
Incrementing or Decrementing a value using setDecrement(key,amount)
or setIncrement(key,amount)
and then calling get(key)
returns _Map<String, dynamic>
Steps to reproduce
- create
ParseObject
- increment or decrement a value using
setIncrement
orsetDecrement
functions - get the value using the value key with
get("key")
- the result of calling
get("key")
isMap
which is not expected
code snippet:
final dietPlansObject = ParseObject("Diet_Plans");
final anyAmount = 1;
dietPlansObject.setIncrement("key", anyAmount);
// dietPlansObject.setDecrement("key", anyAmount);
final value = dietPlansObject.get("key");
print(value.runtimeType); // _Map<String, dynamic>
Actual Outcome
_Map<String, dynamic>
Expected Outcome
num
Environment
Parse Flutter SDK
- SDK version:
3.1.15
- Operating system version:
any
Server
- Parse Server version:
any
Logs
From tests error:
Expected: <Instance of 'num'>
Actual: {'__op': 'Increment', 'amount': 1.0}
Which: is not an instance of 'num'
package:test_api expect
test/src/objects/parse_object_test.dart 1180:11 main...