Merge branch 'development_new_design_2.0' into haroon-new-design

merge-update-with-lab-changes
haroon amjad 4 years ago
commit e67e17c2ba

@ -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);

@ -361,6 +361,6 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
}
}
notifyMeWhenAvailable({itemId, customerId, ProductDetailViewModel model, context}) async {
await model.notifyMe(customerId, itemId, context);
notifyMeWhenAvailable({itemId, customerId, ProductDetailViewModel model, }) async {
await model.notifyMe(customerId, itemId, );
}

@ -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) {

Loading…
Cancel
Save