collection method
Gets a collection reference from Firestore.
Parameters:
forTesting: When true, usesFakeFirebaseFirestorefor testing. Defaults to false.
Returns a CollectionReference that can be used to perform CRUD operations.
Implementation
CollectionReference<Map<String, dynamic>> collection(
{bool forTesting = false}) {
if (forTesting) {
return _fakeFirestore.collection(this);
} else {
return FirebaseFirestore.instance.collection(this);
}
}