[firebase_firestore]: Stream does not load value, but future does on web #13019
Labels
blocked: customer-response
Waiting for customer response, e.g. more information was requested.
platform: web
Issues / PRs which are specifically for web.
plugin: cloud_firestore
type: bug
Something isn't working
Is there an existing issue for this?
Which plugins are affected?
Cloud Firesotre
Which platforms are affected?
Web
Description
After updating Flutter Firestore from version 4.X to 5.X, the web version, the stream no longer emits a value. Downgrading makes the same code work as expected. The future of the same document works without a problem.
Reproducing the issue
Listen to a stream:
Stream<Project> listenProject(String projectId) => _service.doc(FirestorePath.project(projectId)).snapshots().map((DocumentSnapshot<Map<String, dynamic>> data) => Project.fromMap(data.data()!));
Future loads just fine:
Future<Project> getProject(String projectId) async => _service.doc(FirestorePath.project(projectId)).get().then((DocumentSnapshot<Map<String, dynamic>> data) => Project.fromMap(data.data()!));
Firebase Core version
3.1.1
Flutter Version
3.22.2
Relevant Log Output
Flutter dependencies
No response
Additional context and comments
No response
The text was updated successfully, but these errors were encountered: