refreshRelations static method

Future<DocumentModel> refreshRelations(
  1. DocumentModel model
)

Implementation

static Future<DocumentModel> refreshRelations(DocumentModel model) async {
  List<DocumentItemModel>? imagesHolder;
  if (model.images != null) {
    imagesHolder = List<DocumentItemModel>.from(
            await Future.wait(model.images!.map((element) async {
      return await DocumentItemCache.refreshRelations(element);
    })))
        .toList();
  }

  return model.copyWith(
    images: imagesHolder,
  );
}