collection method
Returns a reference to a collection using its class.
Implementation
CollectionReference<Map<String, dynamic>> collection(Type type, { String? subcollection }) {
if (subcollection != null) {
return FS.instance.collection(type.toString()).doc(subcollection).collection(subcollection);
}
return FS.instance.collection(type.toString());
}