set method
this will remove the old document and add another one with the same id
Implementation
Future<WriteResult> set(
Map<String, dynamic> doc, {
bool upset = true,
}) async {
var deleteRes = await delete();
if ((deleteRes.failure || deleteRes.isFailure) && !upset) {
return deleteRes;
}
doc['_id'] = _id;
return _collRef.insertOne(doc);
}