Update method
Implementation
@override
Future<bool> Update(IModelRF model, String docId) async {
String tablename = model.runtimeType.toString();
Map<String, dynamic> data = model.getJson();
for (var entry in data.entries) {
debugPrint(entry.value);
}
_db.collection(tablename).doc(tablename).update(data).then((value) {
debugPrint("DocumentSnapshot successfully updated! ${data.values}");
return true;
}, onError: (e) {
debugPrint("Error updating document $e");
return false;
});
return false;
}