Skip to content

adding or removing values from or into an array and then calling get returns _Map<String, dynamic> #834

@Nidal-Bakir

Description

@Nidal-Bakir

New Issue Checklist

Issue Description

Adding or removing values from or into an array using (setAdd, setAddAll, setAddUnique, setAddAllUnique, setRemove, setRemoveAll) in ParseObject and then calling get returns _Map<String, dynamic>

related to: #696, #842

Steps to reproduce

  1. create ParseObject
  2. add a value to an array using setAdd function for example
  3. get the array using the array key with get("key")
  4. the result of calling get("key") is Map which is not expected

code snippet:

final dietPlansObject = ParseObject("Diet_Plans");

dietPlansObject.setAdd("arrayKey", 1);

final array = dietPlansObject.get("arrayKey");

print(array.runtimeType); // _Map<String, dynamic>

Actual Outcome

_Map<String, dynamic>

Expected Outcome

An Iterable that contains all the added values and does not contain the removed ones

Environment

Parse Flutter SDK

  • SDK version: 3.1.15
  • Operating system version: any

Server

  • Parse Server version: any

Logs

type '_Map<String, dynamic>' is not a subtype of type 'List?' in type cast
package:parse_server_sdk/src/objects/parse_base.dart 223:36 ParseBase.get
test/src/objects/parse_object_test.dart 711:39 main...
parse_object_test.dart:711

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugImpaired feature or lacking behavior that is likely assumed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions