add<T extends FireStoreDoc> abstract method

Future<T> add<T extends FireStoreDoc>(
  1. T obj,
  2. CollectionReference<Object?> collectionReference
)

obj is a user custom object which extends FireStoreDoc, This method is used to add a new document to a collection.

Implementation

/// This method is used to add a new document to a collection.
Future<T> add<T extends FireStoreDoc>(
  T obj,

  /// This is the reference of the collection
  CollectionReference collectionReference,
);