add method

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

add a document to collection with data

Implementation

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