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,25 +22,17 @@ class RewardCard extends ConsumerWidget {
/// Callback when redeem button is pressed
final VoidCallback onRedeem;
const RewardCard({
required this.gift,
required this.onRedeem,
super.key,
});
const RewardCard({required this.gift, required this.onRedeem, super.key});
@override
Widget build(BuildContext context, WidgetRef ref) {
final hasEnoughPoints = ref.watch(
hasEnoughPointsProvider(gift.pointsCost),
);
final hasEnoughPoints = ref.watch(hasEnoughPointsProvider(gift.pointsCost));
final numberFormat = NumberFormat('#,###', 'vi_VN');
return Card(
elevation: 2,
margin: EdgeInsets.symmetric(horizontal: 8, vertical: 8),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
clipBehavior: Clip.antiAlias,
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
@@ -158,9 +150,7 @@ class RewardCard extends ConsumerWidget {
placeholder: (context, url) => Container(
color: AppColors.grey100,
child: const Center(
child: CircularProgressIndicator(
strokeWidth: 2,
),
child: CircularProgressIndicator(strokeWidth: 2),
),
),
errorWidget: (context, url, error) => Container(