initDoc<T extends YustDoc> method

  1. @override
T initDoc<T extends YustDoc>(
  1. YustDocSetup<T> docSetup, [
  2. T? doc
])
override

Initializes a document with an id and the time it was created.

Optionally an existing document can be given, which will still be assigned a new id becoming a new document if it had an id previously.

Implementation

@override
T initDoc<T extends YustDoc>(YustDocSetup<T> docSetup, [T? doc]) {
  final id = _createDocumentId();
  return doInitDoc(docSetup, id, doc);
}