document method
Return a document of the collection
document_handle can be either _id or _key
Implementation
Document document({String? document_handle}) {
String key, id;
if (document_handle == null) {
return Document(collection: this);
}
if (document_handle.contains('/')) {
id = document_handle;
var list = document_handle.split('/');
key = list[1];
} else {
key = document_handle;
id = '${name}/${key}';
}
return Document(collection: this, key: key, id: id);
}