documentFromObject method
- dynamic object, {
- String? subcollection,
Returns a reference to a document using an object.
Implementation
DatabaseReference documentFromObject(dynamic object, { String? subcollection }) {
if (object == null) {
throw NullIDException("Cannot get document reference from null object");
}
return RDB.instance.ref(RDB.constructPathForClassAndID(object.runtimeType, object.id, subcollection: subcollection));
}