collection method

DatabaseReference collection(
  1. Type type, {
  2. String? subcollection,
})

Returns a reference to a collection using its class.

Implementation

DatabaseReference collection(Type type, { String? subcollection }) {
  return RDB.instance.ref(RDB.constructPathForClass(type, subcollection: subcollection));
}