diff --git a/lib/core/viewModels/pharmacyModule/product_detail_view_model.dart b/lib/core/viewModels/pharmacyModule/product_detail_view_model.dart index df895e28..fff3fbf4 100644 --- a/lib/core/viewModels/pharmacyModule/product_detail_view_model.dart +++ b/lib/core/viewModels/pharmacyModule/product_detail_view_model.dart @@ -57,10 +57,10 @@ class ProductDetailViewModel extends BaseViewModel { setState(ViewState.Idle); } - Future notifyMe(customerId, itemID, context) async { + Future notifyMe(customerId, itemID, ) async { hasError = false; setState(ViewState.BusyLocal); - await _productDetailService.notifyMe(customerId, itemID, context); + await _productDetailService.notifyMe(customerId, itemID, ); if (_productDetailService.hasError) { error = _productDetailService.error; setState(ViewState.ErrorLocal); diff --git a/lib/pages/pharmacies/screens/product-details/product-detail.dart b/lib/pages/pharmacies/screens/product-details/product-detail.dart index 5e226fa8..b838f2dd 100644 --- a/lib/pages/pharmacies/screens/product-details/product-detail.dart +++ b/lib/pages/pharmacies/screens/product-details/product-detail.dart @@ -361,6 +361,6 @@ class __ProductDetailPageState extends State { } } -notifyMeWhenAvailable({itemId, customerId, ProductDetailViewModel model, context}) async { - await model.notifyMe(customerId, itemId, context); +notifyMeWhenAvailable({itemId, customerId, ProductDetailViewModel model, }) async { + await model.notifyMe(customerId, itemId, ); } diff --git a/lib/services/pharmacy_services/product_detail_service.dart b/lib/services/pharmacy_services/product_detail_service.dart index 5599fc87..389fda0d 100644 --- a/lib/services/pharmacy_services/product_detail_service.dart +++ b/lib/services/pharmacy_services/product_detail_service.dart @@ -123,10 +123,11 @@ class ProductDetailService extends BaseService { return Future.value(localRes); } - Future notifyMe(customerId, itemID, context) async { + Future notifyMe(customerId, itemID, ) async { hasError = false; await baseAppClient.getPharmacy(SUBSCRIBE_PRODUCT + "SinceId=$customerId&ProductId=$itemID", onSuccess: (dynamic response, int statusCode) { - AppToast.showSuccessToast(message: TranslationBase.of(context).notifyMeMsg + AppToast.showSuccessToast(message: TranslationBase.of(AppGlobal.context).notifyMeMsg + // TranslationBase.of(context).notifyMeMsg //'You will be notified when product available' ); }, onFailure: (String error, int statusCode) {