update method
If refe
is provided, it sets the ref to the new reference.
Also updates all duplicates.
Implementation
@override
Future<void> update([refe]) async {
if (!isMainObject) {
throw 'Only main object can update';
}
await super.update(refe);
// Update duplicates
await Future.wait(duplicateRefs.map((e) => e.set(toMap())));
}