refactor: move verified badge below agent name and remove match percentage display in agent search screen

This commit is contained in:
pradeepkumar
2026-03-30 12:01:45 +05:30
parent 7fe05a1b1b
commit d507a52b87

View File

@@ -475,38 +475,38 @@ class _AgentCardState extends State<_AgentCard> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
// Name row with verified badge // Name
Row( Text.rich(
children: [ TextSpan(
Flexible( children: [
child: Text.rich( TextSpan(
TextSpan( text: agent.firstName,
children: [ style: const TextStyle(
TextSpan( fontFamily: 'Fractul',
text: agent.firstName, fontSize: 15,
style: const TextStyle( fontWeight: FontWeight.w700,
fontFamily: 'Fractul', color: AppColors.primaryDark,
fontSize: 15,
fontWeight: FontWeight.w700,
color: AppColors.primaryDark,
),
),
TextSpan(
text: ' ${agent.lastName}',
style: const TextStyle(
fontFamily: 'Fractul',
fontSize: 15,
fontWeight: FontWeight.w400,
color: AppColors.primaryDark,
),
),
],
), ),
overflow: TextOverflow.ellipsis,
), ),
), TextSpan(
if (agent.isVerified) ...[ text: ' ${agent.lastName}',
const SizedBox(width: 6), style: const TextStyle(
fontFamily: 'Fractul',
fontSize: 15,
fontWeight: FontWeight.w400,
color: AppColors.primaryDark,
),
),
],
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
// Verified badge
if (agent.isVerified) ...[
const SizedBox(height: 4),
Row(
children: [
SvgPicture.asset( SvgPicture.asset(
'assets/icons/verified_badge_icon.svg', 'assets/icons/verified_badge_icon.svg',
width: 16, width: 16,
@@ -528,32 +528,8 @@ class _AgentCardState extends State<_AgentCard> {
), ),
), ),
], ],
// Match badge ),
if (agent.matchPercentage != null) ...[ ],
const SizedBox(width: 8),
Container(
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 4),
decoration: BoxDecoration(
color: agent.matchPercentage! >= 80
? const Color(0xFF638559)
: agent.matchPercentage! >= 65
? const Color(0xFF7D917D)
: AppColors.primaryDark.withValues(alpha: 0.6),
borderRadius: BorderRadius.circular(20),
),
child: Text(
'${agent.matchPercentage}% Match',
style: const TextStyle(
fontFamily: 'SourceSerif4',
fontSize: 12,
fontWeight: FontWeight.w500,
color: Colors.white,
),
),
),
],
],
),
const SizedBox(height: 4), const SizedBox(height: 4),
// Headline / title // Headline / title