doc method

DocumentReference doc([
  1. String? documentPath
])

Gets a DocumentReference for the document within the collection at the specified path. If no documentPath is specified, an automatically-generated unique ID will be used for the returned DocumentReference.

The optional documentPath parameter is a slash-separated path to a document.

Returns non-null DocumentReference.

Implementation

DocumentReference doc([String? documentPath]) {
  final jsObjectDoc =
      (documentPath != null) ? jsObject.doc(documentPath) : jsObject.doc();
  return DocumentReference.getInstance(jsObjectDoc);
}