add auth, format
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user