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,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Flexible(
|
Flexible(
|
||||||
child: Row(
|
child: Text.rich(
|
||||||
mainAxisSize: MainAxisSize.min,
|
TextSpan(
|
||||||
crossAxisAlignment: CrossAxisAlignment.baseline,
|
|
||||||
textBaseline: TextBaseline.alphabetic,
|
|
||||||
children: [
|
children: [
|
||||||
Flexible(
|
TextSpan(
|
||||||
child: Text(
|
text: '${agent.firstName} ${agent.lastName}',
|
||||||
'${agent.firstName} ',
|
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontFamily: 'Fractul',
|
fontFamily: 'Fractul',
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
fontWeight: FontWeight.w700,
|
fontWeight: FontWeight.w700,
|
||||||
color: AppColors.primaryDark,
|
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) ...[
|
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(
|
const Text(
|
||||||
'(Verified Expert)',
|
'(Verified Expert)',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
|
|||||||
Reference in New Issue
Block a user