Skip to content

Commit

Permalink
Add source argument to support cloud_firestore 4.17.0 (#306)
Browse files Browse the repository at this point in the history
* Bump pubspec to latest firebase versions

* Add source argument
  • Loading branch information
fwal committed Apr 19, 2024
1 parent 6164f7f commit 4a457bf
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
5 changes: 4 additions & 1 deletion lib/src/fake_query_with_parent.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ abstract class FakeQueryWithParent<T extends Object?> implements Query<T> {
}

@override
Stream<QuerySnapshot<T>> snapshots({bool includeMetadataChanges = false}) {
Stream<QuerySnapshot<T>> snapshots({
bool includeMetadataChanges = false,
ListenSource? source,
}) {
QuerySnapshotStreamManager().register<T>(this);
final controller =
QuerySnapshotStreamManager().getStreamController<T>(this);
Expand Down
5 changes: 4 additions & 1 deletion lib/src/mock_document_reference.dart
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,10 @@ class MockDocumentReference<T extends Object?>
}

@override
Stream<DocumentSnapshot<T>> snapshots({bool includeMetadataChanges = false}) {
Stream<DocumentSnapshot<T>> snapshots({
bool includeMetadataChanges = false,
ListenSource? source,
}) {
return snapshotStreamController.stream.startWith(_getSync());
}

Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ environment:
dependencies:
flutter:
sdk: flutter
cloud_firestore: ^4.15.9
cloud_firestore_platform_interface: ^6.1.10
cloud_firestore: ^4.17.0
cloud_firestore_platform_interface: ^6.2.0
collection: ^1.14.13
plugin_platform_interface: ^2.0.0
quiver: ^3.0.0
Expand Down

0 comments on commit 4a457bf

Please sign in to comment.