feat: add "+ more" indicator to agent specialization tags when exceeding limit
This commit is contained in:
@@ -696,16 +696,38 @@ class _AgentCardState extends State<_AgentCard> {
|
|||||||
),
|
),
|
||||||
const SizedBox(height: 12),
|
const SizedBox(height: 12),
|
||||||
|
|
||||||
// Specialization tags
|
// Expertise tags
|
||||||
if (specializations.isNotEmpty) ...[
|
if (specializations.isNotEmpty) ...[
|
||||||
Wrap(
|
Wrap(
|
||||||
alignment: WrapAlignment.start,
|
alignment: WrapAlignment.start,
|
||||||
spacing: 6,
|
spacing: 6,
|
||||||
runSpacing: 6,
|
runSpacing: 6,
|
||||||
children: specializations
|
children: [
|
||||||
.take(6)
|
...specializations
|
||||||
.map((tag) => _buildTag(tag))
|
.take(6)
|
||||||
.toList(),
|
.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),
|
const SizedBox(height: 14),
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user