Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
quaaantumdev opened this issue Apr 17, 2025 · 0 comments
Labels
Needs Attention This issue needs maintainer attention. plugin: cloud_firestore type: enhancement New feature or request

Comments

@quaaantumdev
Copy link

quaaantumdev commented Apr 17, 2025

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

@quaaantumdev quaaantumdev added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Apr 17, 2025
@quaaantumdev quaaantumdev changed the title [cloud_firestore]: transaction.update accepts data as Map<String, dynamic> but should alllow Object keys for FieldPath [cloud_firestore]: transaction.update accepts data as Map<String, dynamic> but should allow Object keys for FieldPath Apr 17, 2025
@SelaseKay SelaseKay added type: enhancement New feature or request plugin: cloud_firestore and removed type: bug Something isn't working labels Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Attention This issue needs maintainer attention. plugin: cloud_firestore type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants