refreshRelations static method

Future<ProductDisplayModel> refreshRelations(
  1. ProductDisplayModel model
)

Implementation

static Future<ProductDisplayModel> refreshRelations(
    ProductDisplayModel model) async {
  ShopModel? shopHolder;
  if (model.shop != null) {
    try {
      await shopRepository(appId: model.appId)!
          .get(model.shop!.documentID)
          .then((val) {
        shopHolder = val;
      }).catchError((error) {});
    } catch (_) {}
  }

  return model.copyWith(
    shop: shopHolder,
  );
}