fetchDocumentById abstract method
Fetches a document from Firestore by its ID.
collection
: The name of the Firestore collection.
docId
: The ID of the document to fetch.
Returns a Future that resolves to a DocumentSnapshot containing the document data.
Implementation
Future<DocumentSnapshot<Object?>> fetchDocumentById(
String collection, String docId);