refreshRelations static method

Future<DrawerModel> refreshRelations(
  1. DrawerModel model
)

Implementation

static Future<DrawerModel> refreshRelations(DrawerModel model) async {
  MenuDefModel? menuHolder;
  if (model.menu != null) {
    try {
      await menuDefRepository(appId: model.appId)!
          .get(model.menu!.documentID)
          .then((val) {
        menuHolder = val;
      }).catchError((error) {});
    } catch (_) {}
  }

  return model.copyWith(
    menu: menuHolder,
  );
}