update cart
This commit is contained in:
@@ -238,7 +238,7 @@ class ProductCard extends ConsumerWidget {
|
||||
width: double.infinity,
|
||||
height: 36.0,
|
||||
child: ElevatedButton.icon(
|
||||
onPressed: product.inStock ? onAddToCart : null,
|
||||
onPressed: !product.inStock ? onAddToCart : null,
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: AppColors.primaryBlue,
|
||||
foregroundColor: AppColors.white,
|
||||
@@ -256,7 +256,7 @@ class ProductCard extends ConsumerWidget {
|
||||
),
|
||||
icon: const Icon(Icons.shopping_cart, size: 16.0),
|
||||
label: Text(
|
||||
product.inStock ? 'Thêm vào giỏ' : l10n.outOfStock,
|
||||
!product.inStock ? 'Thêm vào giỏ' : l10n.outOfStock,
|
||||
style: const TextStyle(
|
||||
fontSize: 12.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
|
||||
Reference in New Issue
Block a user