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

@@ -16,12 +16,12 @@ import 'package:worker/features/home/domain/entities/promotion.dart';
/// Displays a horizontal scrollable list of promotion cards.
/// Each card shows an image, title, and brief description.
class PromotionSlider extends StatelessWidget {
const PromotionSlider({
super.key,
required this.promotions,
this.onPromotionTap,
});
/// List of promotions to display
final List<Promotion> promotions;
@@ -83,11 +83,7 @@ class PromotionSlider extends StatelessWidget {
/// Individual Promotion Card
class _PromotionCard extends StatelessWidget {
const _PromotionCard({
required this.promotion,
this.onTap,
});
const _PromotionCard({required this.promotion, this.onTap});
final Promotion promotion;
final VoidCallback? onTap;
@@ -115,8 +111,9 @@ class _PromotionCard extends StatelessWidget {
children: [
// Promotion Image
ClipRRect(
borderRadius:
const BorderRadius.vertical(top: Radius.circular(12)),
borderRadius: const BorderRadius.vertical(
top: Radius.circular(12),
),
child: CachedNetworkImage(
imageUrl: promotion.imageUrl,
height: 140,
@@ -125,9 +122,7 @@ class _PromotionCard extends StatelessWidget {
placeholder: (context, url) => Container(
height: 140,
color: AppColors.grey100,
child: const Center(
child: CircularProgressIndicator(),
),
child: const Center(child: CircularProgressIndicator()),
),
errorWidget: (context, url, error) => Container(
height: 140,