-
Notifications
You must be signed in to change notification settings - Fork 4k
[cloud_firestore] migrate to platform interface #1945
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
[cloud_firestore] migrate to platform interface #1945
Conversation
- Migrated DocumentReference and CollectionReference to use interfaces
- added where support
- fixed test failure causes
Feature/firestore web support
- use any as versions
Created FieldValueFactory to provide platform-specific FieldValue instances
Added NO-OP folders for android & ios in firestore web package
- Removed unnecessary tracking of collection reference delegate and used the more generic query type instead - fixed breakage
Rename SnapshotMetadata and DocumentSnapshot in PlatformInterface to SnapshotMetadataPlatform and DocumentSnapshotPlatform so they don't collide with class names exported by the core plugin.
* Web doesn't need it, it can delegate all that logic to the JS client. * It's only required for MethodChannel. Move it to method_channel/utils.
This change exposes the FieldValuePlatform abstract class to plugin users, so they can have a way of typing the result of calling the FieldValue.whatever() methods, without having to keep an internal 'instance' as part of the exposed interface.
Refactor tests and code around the new API.
Changed from FlutterFire Maintainers
packages/cloud_firestore/cloud_firestore/lib/src/field_value.dart
Outdated
Show resolved
Hide resolved
packages/cloud_firestore/cloud_firestore/lib/src/field_value.dart
Outdated
Show resolved
Hide resolved
packages/cloud_firestore/cloud_firestore/lib/src/field_value.dart
Outdated
Show resolved
Hide resolved
packages/cloud_firestore/cloud_firestore/lib/src/transaction.dart
Outdated
Show resolved
Hide resolved
Co-Authored-By: Collin Jackson <[email protected]>
Co-Authored-By: Collin Jackson <[email protected]>
Co-Authored-By: Collin Jackson <[email protected]>
Co-Authored-By: Collin Jackson <[email protected]>
Co-Authored-By: Collin Jackson <[email protected]>
packages/cloud_firestore/cloud_firestore/lib/src/utils/codec_utility.dart
Show resolved
Hide resolved
Tagged and published cloud_firestore 0.13.1! |
This PR introduced a breaking change which is not documented. Before the PR it was possible to add data to the data property in DocumentSnapshot. E.g. we have added the Maybe this should be highlighted. |
Any news on supporting Realtime Database as well? |
Description
Migrate
cloud_firestore
to usecloud_firestore_platform_interface
Related Issues
This is part of the changes mentioned in this PR.
It is a follow-up of an the following merged [PR] (#1686)
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]
). This will ensure a smooth and quick review process.///
).flutter analyze
) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?