addDoc method
Implementation
Future<FirestoreErrors?> addDoc({
required String collPath,
Map<String, Object?> data = const {},
}) async {
try {
data.removeWhere((key, value) => value == null);
await firestoreInstance.collection(collPath).add(data);
} catch (error, stackTrace) {
return FirestoreErrors(error, stackTrace);
}
return null;
}