collection method
Gets a CollectionReference
for the specified Firestore path.
Implementation
@override
CollectionReference<Map<String, dynamic>> collection(String path) {
final segments = path.split('/');
assert(segments.length % 2 == 1,
'Invalid document reference. Collection references must have an odd number of segments');
return MockCollectionReference(this, path, getSubpath(_root, path),
_docsData, getSubpath(_snapshotStreamControllerRoot, path));
}