refreshRelations static method
Implementation
static Future<AppModel> refreshRelations(AppModel model) async {
PublicMediumModel? anonymousProfilePhotoHolder;
if (model.anonymousProfilePhoto != null) {
try {
await publicMediumRepository()!
.get(model.anonymousProfilePhoto!.documentID)
.then((val) {
anonymousProfilePhotoHolder = val;
}).catchError((error) {});
} catch (_) {}
}
PublicMediumModel? logoHolder;
if (model.logo != null) {
try {
await publicMediumRepository()!.get(model.logo!.documentID).then((val) {
logoHolder = val;
}).catchError((error) {});
} catch (_) {}
}
return model.copyWith(
anonymousProfilePhoto: anonymousProfilePhotoHolder,
logo: logoHolder,
);
}