From 9fbc0ba3d095da23e1c22270ec35e70dce1e5364 Mon Sep 17 00:00:00 2001 From: pradeepkumar Date: Mon, 13 Apr 2026 18:00:01 +0530 Subject: [PATCH] refactor: reduce top professionals section height and limit displayed expertise tags to one --- .../presentation/widgets/top_professionals_section.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/features/home/presentation/widgets/top_professionals_section.dart b/lib/features/home/presentation/widgets/top_professionals_section.dart index 911a099..97fed2f 100644 --- a/lib/features/home/presentation/widgets/top_professionals_section.dart +++ b/lib/features/home/presentation/widgets/top_professionals_section.dart @@ -106,7 +106,7 @@ class _TopProfessionalsSectionState else ...[ // Professional Cards - horizontal scroll SizedBox( - height: 540, + height: 490, child: ListView.builder( // Unique key per tab forces Flutter to rebuild (not reuse) // the list items, preventing stale images from the other tab. @@ -466,8 +466,8 @@ class _TopProfessionalsSectionState spacing: 6, runSpacing: 6, children: [ - ...expertiseTags.take(2).map((tag) => _buildTag(tag)), - if (expertiseTags.length > 2) + ...expertiseTags.take(1).map((tag) => _buildTag(tag)), + if (expertiseTags.length > 1) Container( padding: const EdgeInsets.symmetric( horizontal: 10, @@ -484,7 +484,7 @@ class _TopProfessionalsSectionState ), ), child: Text( - '+${expertiseTags.length - 2} more', + '+${expertiseTags.length - 1} more', style: const TextStyle( fontFamily: 'SourceSerif4', fontSize: 13,