refactor: remove star rating and update expertise tag display and padding in top professionals section
This commit is contained in:
@@ -298,7 +298,6 @@ class _TopProfessionalsSectionState
|
|||||||
final experience = item.experience;
|
final experience = item.experience;
|
||||||
final locationText = item.location;
|
final locationText = item.location;
|
||||||
final subtitle = item.subtitle.isNotEmpty ? '(${item.subtitle})' : '';
|
final subtitle = item.subtitle.isNotEmpty ? '(${item.subtitle})' : '';
|
||||||
final rating = item.rating > 0 ? item.rating : 5.0;
|
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
@@ -348,7 +347,7 @@ class _TopProfessionalsSectionState
|
|||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.fromLTRB(16, 12, 16, 14),
|
padding: const EdgeInsets.fromLTRB(16, 20, 16, 14),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
@@ -467,8 +466,8 @@ class _TopProfessionalsSectionState
|
|||||||
spacing: 6,
|
spacing: 6,
|
||||||
runSpacing: 6,
|
runSpacing: 6,
|
||||||
children: [
|
children: [
|
||||||
...expertiseTags.take(3).map((tag) => _buildTag(tag)),
|
...expertiseTags.take(2).map((tag) => _buildTag(tag)),
|
||||||
if (expertiseTags.length > 3)
|
if (expertiseTags.length > 2)
|
||||||
Container(
|
Container(
|
||||||
padding: const EdgeInsets.symmetric(
|
padding: const EdgeInsets.symmetric(
|
||||||
horizontal: 10,
|
horizontal: 10,
|
||||||
@@ -485,7 +484,7 @@ class _TopProfessionalsSectionState
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
'+${expertiseTags.length - 3} more',
|
'+${expertiseTags.length - 2} more',
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontFamily: 'SourceSerif4',
|
fontFamily: 'SourceSerif4',
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
@@ -530,19 +529,6 @@ class _TopProfessionalsSectionState
|
|||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
],
|
],
|
||||||
|
|
||||||
// Star Rating
|
|
||||||
Row(
|
|
||||||
children: List.generate(rating.round().clamp(0, 5), (i) {
|
|
||||||
return Padding(
|
|
||||||
padding: const EdgeInsets.only(right: 4),
|
|
||||||
child: SvgPicture.asset(
|
|
||||||
'assets/icons/star_filled_icon.svg',
|
|
||||||
width: 18,
|
|
||||||
height: 17,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user