createWithPath method

Future<void> createWithPath(
  1. String d
)

Creates a new document with the specified path and sets the ref to the newly created document.

Implementation

Future<void> createWithPath(String d) async {
  if (ref != null) {
    throw 'Document reference is null';
  }
  ref = firestore.doc(d);
  await ref!.set(toMap());
}