addtocart
This commit is contained in:
@@ -109,16 +109,20 @@ class AddtocartProvider extends ChangeNotifier {
|
||||
|
||||
return result.fold(
|
||||
(error) {
|
||||
print("dsjfgkjhkdfgdkjfhg");
|
||||
isLoaddcartItem = false;
|
||||
notifyListeners();
|
||||
},
|
||||
(response) {
|
||||
print("dsjfgkjhkdjsfjkdhfsgfgdkjfhg");
|
||||
allitem = response!;
|
||||
isLoaddcartItem = false;
|
||||
notifyListeners();
|
||||
},
|
||||
);
|
||||
} catch (e) {
|
||||
} catch (e)
|
||||
{
|
||||
print("sfddsfdfff");
|
||||
isLoaddcartItem = false;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
@@ -360,7 +360,8 @@ class ProductProvider extends ChangeNotifier {
|
||||
int get quantity => _quantity;
|
||||
double get totalPrice => _totalPrice;
|
||||
|
||||
void setProductPrice(double price) {
|
||||
void setProductPrice(double price)
|
||||
{
|
||||
_unitPrice = price;
|
||||
_totalPrice = _unitPrice * _quantity;
|
||||
notifyListeners();
|
||||
|
||||
@@ -93,6 +93,8 @@ class ProductRepo {
|
||||
|
||||
AllCartItems allCartItems = allCartItemsFromJson(response.toString());
|
||||
|
||||
print("jdfgjkdf${allCartItems}");
|
||||
|
||||
return right(allCartItems);
|
||||
} on DioException catch (e) {
|
||||
print("sdkjfkjdkfjgjfdjg");
|
||||
|
||||
Reference in New Issue
Block a user