Document<T> constructor

Document<T>(
  1. Collection parent,
  2. String documentId
)

Constructs a document. Usually you should call the method collection.document("id") instead of this constructor.

Implementation

Document(this.parent, this.documentId)
    : assert(parent != null),
      assert(documentId != null) {
  ArgumentError.checkNotNull(database, 'database');
  if (documentId == null || documentId.isEmpty) {
    throw ArgumentError.value(documentId, 'documentId');
  }
}