Skip to content

Commit ac36670

Browse files
Renamed 'getCollection()' to collecition() in DocumentReference (flutter#488)
1 parent cec8437 commit ac36670

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

packages/cloud_firestore/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.6.0
2+
3+
* **Breaking change**. Renamed 'getCollection()' to 'collection().'
4+
15
## 0.5.1
26

37
* Expose the Firebase app corresponding to a Firestore

packages/cloud_firestore/lib/src/document_reference.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class DocumentReference {
8787

8888
/// Returns the reference of a collection contained inside of this
8989
/// document.
90-
CollectionReference getCollection(String collectionPath) {
90+
CollectionReference collection(String collectionPath) {
9191
return firestore.collection(
9292
<String>[path, collectionPath].join('/'),
9393
);

packages/cloud_firestore/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: Flutter plugin for Cloud Firestore, a cloud-hosted, noSQL database
33
live synchronization and offline support on Android and iOS.
44
author: Flutter Team <flutter-dev@googlegroups.com>
55
homepage: https://github.com/flutter/plugins/tree/master/packages/cloud_firestore
6-
version: 0.5.1
6+
version: 0.6.0
77

88
flutter:
99
plugin:

packages/cloud_firestore/test/cloud_firestore_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,9 +475,9 @@ void main() {
475475
expect(e.code, equals('UNKNOWN_PATH'));
476476
}
477477
});
478-
test('getCollection', () async {
478+
test('collection', () async {
479479
final CollectionReference colRef =
480-
collectionReference.document('bar').getCollection('baz');
480+
collectionReference.document('bar').collection('baz');
481481
expect(colRef.path, 'foo/bar/baz');
482482
});
483483
});

0 commit comments

Comments
 (0)