add method

Future<DocumentReference> add(
  1. Map<String, dynamic> data
)

Adds a new document to this collection with the specified data, assigning it a document ID automatically.

The data parameter must not be null.

Returns non-null Future that resolves with a DocumentReference pointing to the newly created document after it has been written to the backend.

Implementation

Future<DocumentReference> add(Map<String, dynamic> data) =>
    handleThenable(jsObject.add(jsify(data)))
        .then(DocumentReference.getInstance);