FirestoreCollection constructor

FirestoreCollection({
  1. required String collectionId,
  2. dynamic onDocUpdate(
    1. Model,
    2. bool
    )?,
})

Creates a new FirestoreCollection.

Implementation

FirestoreCollection({required this.collectionId, this.onDocUpdate}) {
  try {
    _db = FirebaseFirestore.instance;
    _db.collection(collectionId);
  } on Exception {
    // The most probable cause is that Firebase.initializeApp() has not been called at this point.
  }
}