add method

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

add a document to collection with data

Implementation

Future<DocumentReference> add(Map<String, dynamic> data) {
  try {
    CollectionReference colRef = _collectionReference;
    return colRef.add(data);
  } catch (e) {
    throw Exception(
        'cannot call add on Query, use collection reference instead');
  }
}