feat(validation): surface verification status in garage cards
This commit is contained in:
parent
d3f6fc3853
commit
e7fe347670
2 changed files with 27 additions and 0 deletions
|
|
@ -277,6 +277,7 @@ class GarageScreenState extends State<GarageScreen> {
|
|||
series: global?['series'] as String?,
|
||||
year: global?['year'] as int?,
|
||||
color: global?['color'] as String?,
|
||||
isVerified: global?['is_verified'] == true,
|
||||
imageUrl: car['signed_image_url'] as String?,
|
||||
isSelected: _selectedIds.contains(carId),
|
||||
addedAt: car['created_at'] != null
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ class CarCard extends StatelessWidget {
|
|||
final int? year;
|
||||
final String? color;
|
||||
final String? imageUrl;
|
||||
final bool isVerified;
|
||||
final DateTime? addedAt;
|
||||
final VoidCallback? onTap;
|
||||
final VoidCallback? onLongPress;
|
||||
|
|
@ -23,6 +24,7 @@ class CarCard extends StatelessWidget {
|
|||
this.year,
|
||||
this.color,
|
||||
this.imageUrl,
|
||||
this.isVerified = false,
|
||||
this.addedAt,
|
||||
this.onTap,
|
||||
this.onLongPress,
|
||||
|
|
@ -119,6 +121,30 @@ class CarCard extends StatelessWidget {
|
|||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 6),
|
||||
Row(
|
||||
children: [
|
||||
Icon(
|
||||
isVerified
|
||||
? Icons.verified
|
||||
: Icons.hourglass_bottom,
|
||||
size: 12,
|
||||
color: isVerified
|
||||
? AppColors.success
|
||||
: AppColors.textHint,
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
isVerified ? 'Verified' : 'Pending',
|
||||
style: theme.textTheme.bodySmall?.copyWith(
|
||||
color: isVerified
|
||||
? AppColors.success
|
||||
: AppColors.textHint,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
if (name != null && name!.isNotEmpty) ...[
|
||||
const SizedBox(height: 6),
|
||||
Text(
|
||||
|
|
|
|||
Loading…
Reference in a new issue