|
|
|
|
@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'
|
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/product_detail_view_model.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/pharmacies/compare-list.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/pharmacies/screens/cart-order-page.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/product-name-and-price.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/recommended_products.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/reviews_info.dart';
|
|
|
|
|
@ -13,6 +14,7 @@ import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
|
|
import 'availability_info.dart';
|
|
|
|
|
@ -331,6 +333,7 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
|
|
|
|
|
quantity: quantity,
|
|
|
|
|
isOverQuantity: isOverQuantity,
|
|
|
|
|
addToCartFunction: addToCartFunction,
|
|
|
|
|
addToShoppingCartFunction: addToShoppingCartFunction,
|
|
|
|
|
model: model,
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
@ -355,6 +358,18 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
|
|
|
|
|
await model.addToCartData(quantity, itemID);
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
addToShoppingCartFunction(
|
|
|
|
|
{quantity,
|
|
|
|
|
itemID,
|
|
|
|
|
ProductDetailViewModel model}) async {
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
await model.addToCartData(quantity, itemID);
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(page: CartOrderPage()));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|