feat: add "+ more" indicator to agent specialization tags when exceeding limit

This commit is contained in:
pradeepkumar
2026-03-28 20:21:11 +05:30
parent 3c426f2a14
commit 61060527f8

View File

@@ -696,16 +696,38 @@ class _AgentCardState extends State<_AgentCard> {
),
const SizedBox(height: 12),
// Specialization tags
// Expertise tags
if (specializations.isNotEmpty) ...[
Wrap(
alignment: WrapAlignment.start,
spacing: 6,
runSpacing: 6,
children: specializations
.take(6)
.map((tag) => _buildTag(tag))
.toList(),
children: [
...specializations
.take(6)
.map((tag) => _buildTag(tag)),
if (specializations.length > 6)
Container(
padding: const EdgeInsets.symmetric(
horizontal: 10, vertical: 5),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20),
color: AppColors.accentOrange
.withValues(alpha: 0.1),
border: Border.all(
color: AppColors.accentOrange, width: 0.7),
),
child: Text(
'+${specializations.length - 6} more',
style: const TextStyle(
fontFamily: 'SourceSerif4',
fontSize: 13,
fontWeight: FontWeight.w600,
color: AppColors.accentOrange,
),
),
),
],
),
const SizedBox(height: 14),
],