Skip to content

[cloud_firestore]: transaction.update accepts data as Map<String, dynamic> but should allow Object keys for FieldPath #17287

Open
@quaaantumdev

Description

@quaaantumdev

Is there an existing issue for this?

  • I have searched the existing issues.

Which plugins are affected?

Database

Which platforms are affected?

Android

Description

the current implementation uses an incorrect type for the Transaction.update method's data. It only allows for Map<String,dynamic>, that excludes FieldPath as a key. FieldPath is somewhat essential.

Here is the exact line:

Update: I noted before that only the method signature needs to change, that is not correct. I did look into it a bit further and the platform interfaces also work with a Map<String,dynamic> at this point. However, However, I did not see any reason this limitation should be in place, it's probably just a historically thing.

Reproducing the issue

Try patching data using Map<FieldPath, dynamic>, the signature won't accept it.

Firebase Core version

3.13.0

Flutter Version

3.29.2

Relevant Log Output

Flutter dependencies

No response

Additional context and comments

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions