Closed ramsayamarin closed 2 weeks ago
This appears to be an issue with cloud_firestore. This should be reported on the flutterfire repository.
Closing from here as this plugin is not maintained on this repo.
Thank you
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v
and a minimal reproduction of the issue.
Steps to reproduce
Create a snapshot query like this example:
Expected results
The docs say the following about includeMetadataChanges:
Actual results
On an Android device, this is true, and the snapshot is received twice, from the cache and then from server, but on iOS a cached followed by a server snapshot is only delivered the first time the query is executed, and if the same query is recreated later on the same data, a server snapshot is not received until the target data is updated. This was not the case in previous versions of the Firebase plugins or on Android, but it appeared in the latest version on iOS when I updated the plugins.
Code sample
Code sample
```dart final query = templateQuery .startAt([geoHash]) .endAt(['$geoHash~']) .limit(geoHashFetchCount) .snapshots(includeMetadataChanges: true) .listen( (snapshot) { if (snapshot.metadata.isFromCache) { return; } else... //This part is never reached if the query gets recreated on the same data, unless the data is updated ```Screenshots or Video
Screenshots / Video demonstration
[Upload media here]Logs
Logs
```console [Paste your logs here] ```Flutter Doctor output
Doctor output
```console [✓] Flutter (Channel stable, 3.19.6, on Microsoft Windows [Version 10.0.22631.3527], locale en-US) [✓] Windows Version (Installed version of Windows is version 10 or higher) [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0-rc2) [✓] Chrome - develop for the web [✓] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.6.0) [✓] Android Studio (version 2022.2) [✓] IntelliJ IDEA Ultimate Edition (version 2024.1) [✓] Connected device (4 available) [✓] Network resources • No issues found! ```