refactor: reduce top professionals section height and limit displayed expertise tags to one

This commit is contained in:
pradeepkumar
2026-04-13 18:00:01 +05:30
parent b73854e086
commit 9fbc0ba3d0

View File

@@ -106,7 +106,7 @@ class _TopProfessionalsSectionState
else ...[ else ...[
// Professional Cards - horizontal scroll // Professional Cards - horizontal scroll
SizedBox( SizedBox(
height: 540, height: 490,
child: ListView.builder( child: ListView.builder(
// Unique key per tab forces Flutter to rebuild (not reuse) // Unique key per tab forces Flutter to rebuild (not reuse)
// the list items, preventing stale images from the other tab. // the list items, preventing stale images from the other tab.
@@ -466,8 +466,8 @@ class _TopProfessionalsSectionState
spacing: 6, spacing: 6,
runSpacing: 6, runSpacing: 6,
children: [ children: [
...expertiseTags.take(2).map((tag) => _buildTag(tag)), ...expertiseTags.take(1).map((tag) => _buildTag(tag)),
if (expertiseTags.length > 2) if (expertiseTags.length > 1)
Container( Container(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(
horizontal: 10, horizontal: 10,
@@ -484,7 +484,7 @@ class _TopProfessionalsSectionState
), ),
), ),
child: Text( child: Text(
'+${expertiseTags.length - 2} more', '+${expertiseTags.length - 1} more',
style: const TextStyle( style: const TextStyle(
fontFamily: 'SourceSerif4', fontFamily: 'SourceSerif4',
fontSize: 13, fontSize: 13,