refreshRelations static method

Future<BookletModel> refreshRelations(
  1. BookletModel model
)

Implementation

static Future<BookletModel> refreshRelations(BookletModel model) async {
  List<SectionModel>? sectionsHolder;
  if (model.sections != null) {
    sectionsHolder = List<SectionModel>.from(
            await Future.wait(model.sections!.map((element) async {
      return await SectionCache.refreshRelations(element);
    })))
        .toList();
  }

  return model.copyWith(
    sections: sectionsHolder,
  );
}