feat: Add optional agentTypeId field to RegisterRequest model.
This commit is contained in:
@@ -624,70 +624,83 @@ class _AgentDetailScreenState extends ConsumerState<AgentDetailScreen> {
|
||||
),
|
||||
],
|
||||
const SizedBox(height: 8),
|
||||
// Location + Member Since (same line, matching web ProfileCard)
|
||||
// Location (wrapping) + Member Since (separate line)
|
||||
Builder(builder: (_) {
|
||||
final parts = state.locationParts;
|
||||
const maxVisible = 1;
|
||||
final firstPart = parts.isNotEmpty ? parts.first : '';
|
||||
const maxVisible = 4;
|
||||
final visibleParts = parts.take(maxVisible).join(', ');
|
||||
final remaining = parts.length - maxVisible;
|
||||
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
return Column(
|
||||
children: [
|
||||
if (parts.isNotEmpty) ...[
|
||||
SvgPicture.asset(
|
||||
'assets/icons/location_pin_icon.svg',
|
||||
width: 18,
|
||||
height: 18,
|
||||
GestureDetector(
|
||||
onTap: remaining > 0 ? () => _showLocationModal(parts) : null,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 2),
|
||||
child: SvgPicture.asset(
|
||||
'assets/icons/location_pin_icon.svg',
|
||||
width: 18,
|
||||
height: 18,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
Flexible(
|
||||
child: Text.rich(
|
||||
TextSpan(
|
||||
children: [
|
||||
TextSpan(
|
||||
text: visibleParts,
|
||||
style: const TextStyle(
|
||||
fontFamily: 'SourceSerif4',
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: AppColors.primaryDark,
|
||||
),
|
||||
),
|
||||
if (remaining > 0)
|
||||
TextSpan(
|
||||
text: ' +$remaining more',
|
||||
style: const TextStyle(
|
||||
fontFamily: 'SourceSerif4',
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: AppColors.accentOrange,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
ConstrainedBox(
|
||||
constraints: const BoxConstraints(maxWidth: 120),
|
||||
child: Text(
|
||||
firstPart,
|
||||
const SizedBox(height: 6),
|
||||
],
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
SvgPicture.asset(
|
||||
'assets/icons/calendar_icon.svg',
|
||||
width: 18,
|
||||
height: 18,
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
agent.memberSinceText,
|
||||
style: const TextStyle(
|
||||
fontFamily: 'SourceSerif4',
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w700,
|
||||
fontSize: 13,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: AppColors.primaryDark,
|
||||
),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 1,
|
||||
),
|
||||
),
|
||||
if (remaining > 0)
|
||||
GestureDetector(
|
||||
onTap: () => _showLocationModal(parts),
|
||||
child: Text(
|
||||
' +$remaining more',
|
||||
style: const TextStyle(
|
||||
fontFamily: 'SourceSerif4',
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: AppColors.accentOrange,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
],
|
||||
SvgPicture.asset(
|
||||
'assets/icons/calendar_icon.svg',
|
||||
width: 18,
|
||||
height: 18,
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
Flexible(
|
||||
child: Text(
|
||||
agent.memberSinceText,
|
||||
style: const TextStyle(
|
||||
fontFamily: 'SourceSerif4',
|
||||
fontSize: 13,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: AppColors.primaryDark,
|
||||
),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 1,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user