logComment static method
Implementation
static Future<void> logComment(
String type,
String id,
String recordId,
String comment) async {
try {
FirebaseApp app = Instadiv.getInstance().firebaseApp;
FirebaseFirestore firestore = FirebaseFirestore.instanceFor(app: app);
Map<String, dynamic> data = {
'comment' : comment
};
firestore
.collection(instaCollection)
.doc(Instadiv.getInstance().project)
.collection(type)
.doc(id)
.collection('data')
.doc(recordId)
.update(data);
} catch (e){
print('Error $e');
}
}