add auth, format

This commit is contained in:
Phuoc Nguyen
2025-11-07 11:52:06 +07:00
parent 24a8508fce
commit 3803bd26e0
173 changed files with 8505 additions and 7116 deletions

View File

@@ -22,10 +22,7 @@ import 'package:worker/features/products/domain/entities/product.dart';
class FavoriteProductCard extends ConsumerWidget {
final Product product;
const FavoriteProductCard({
super.key,
required this.product,
});
const FavoriteProductCard({super.key, required this.product});
String _formatPrice(double price) {
final formatter = NumberFormat('#,###', 'vi_VN');
@@ -60,7 +57,9 @@ class FavoriteProductCard extends ConsumerWidget {
if (confirmed == true && context.mounted) {
// Remove from favorites
await ref.read(favoritesProvider.notifier).removeFavorite(product.productId);
await ref
.read(favoritesProvider.notifier)
.removeFavorite(product.productId);
// Show snackbar
if (context.mounted) {
@@ -103,9 +102,7 @@ class FavoriteProductCard extends ConsumerWidget {
placeholder: (context, url) => Shimmer.fromColors(
baseColor: AppColors.grey100,
highlightColor: AppColors.grey50,
child: Container(
color: AppColors.grey100,
),
child: Container(color: AppColors.grey100),
),
errorWidget: (context, url, error) => Container(
color: AppColors.grey100,