update cart

This commit is contained in:
Phuoc Nguyen
2025-11-14 16:19:25 +07:00
parent 4738553d2e
commit aae3c9d080
30 changed files with 5954 additions and 758 deletions

View File

@@ -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,