refreshRelations static method

Future<CartModel> refreshRelations(
  1. CartModel model
)

Implementation

static Future<CartModel> refreshRelations(CartModel 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,
  );
}