documentFromPath method

DocumentReference<Map<String, dynamic>> documentFromPath(
  1. String path
)

Returns a reference to a document using its path.

Implementation

DocumentReference<Map<String, dynamic>> documentFromPath(String path) {
  if (path.isEmpty) {
    throw NullIDException("Cannot get document reference from an empty path");
  }
  if (!path.contains("/")) {
    throw NullIDException("Cannot get document reference from invalid path: $path");
  }
  return FS.instance.doc(path);
}