refactor: Consolidate agent name display into a single Text.rich widget and adjust verified icon padding.
This commit is contained in:
@@ -527,46 +527,29 @@ class _AgentHomeContentState extends ConsumerState<_AgentHomeContent> {
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Flexible(
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.baseline,
|
||||
textBaseline: TextBaseline.alphabetic,
|
||||
children: [
|
||||
Flexible(
|
||||
child: Text(
|
||||
'${agent.firstName} ',
|
||||
child: Text.rich(
|
||||
TextSpan(
|
||||
children: [
|
||||
TextSpan(
|
||||
text: '${agent.firstName} ${agent.lastName}',
|
||||
style: const TextStyle(
|
||||
fontFamily: 'Fractul',
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: AppColors.primaryDark,
|
||||
),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
if (agent.isVerified)
|
||||
const Padding(
|
||||
padding: EdgeInsets.only(right: 4),
|
||||
child: Icon(Icons.verified,
|
||||
size: 16, color: Color(0xFF2196F3)),
|
||||
),
|
||||
Flexible(
|
||||
child: Text(
|
||||
agent.lastName,
|
||||
style: const TextStyle(
|
||||
fontFamily: 'Fractul',
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: AppColors.primaryDark,
|
||||
),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
if (agent.isVerified) ...[
|
||||
const SizedBox(width: 6),
|
||||
const Padding(
|
||||
padding: EdgeInsets.only(left: 6, right: 4),
|
||||
child: Icon(Icons.verified,
|
||||
size: 16, color: Color(0xFF2196F3)),
|
||||
),
|
||||
const Text(
|
||||
'(Verified Expert)',
|
||||
style: TextStyle(
|
||||
|
||||
Reference in New Issue
Block a user