feat: Add professional ratings to cards, implement scroll-to-top on home tab re-tap, and improve agent type fetching in the hero section.
This commit is contained in:
@@ -103,7 +103,7 @@ class _TopProfessionalsSectionState
|
||||
else ...[
|
||||
// Professional Cards - horizontal scroll
|
||||
SizedBox(
|
||||
height: 480,
|
||||
height: 540,
|
||||
child: ListView.builder(
|
||||
controller: _scrollController,
|
||||
scrollDirection: Axis.horizontal,
|
||||
@@ -293,8 +293,10 @@ class _TopProfessionalsSectionState
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// Image
|
||||
Expanded(
|
||||
// Image (226px per Figma)
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
height: 226,
|
||||
child: ClipRRect(
|
||||
borderRadius:
|
||||
const BorderRadius.vertical(top: Radius.circular(15)),
|
||||
@@ -302,7 +304,7 @@ class _TopProfessionalsSectionState
|
||||
? S3Image(
|
||||
imageUrl: imageUrl,
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
height: 226,
|
||||
fit: BoxFit.cover,
|
||||
alignment: Alignment.topCenter,
|
||||
placeholder: (_) => _buildImagePlaceholder(index),
|
||||
@@ -313,7 +315,8 @@ class _TopProfessionalsSectionState
|
||||
),
|
||||
|
||||
// Content
|
||||
Padding(
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.fromLTRB(16, 12, 16, 12),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -468,9 +471,26 @@ class _TopProfessionalsSectionState
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
],
|
||||
|
||||
// Star Rating
|
||||
Row(
|
||||
children: List.generate(5, (i) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(right: 4),
|
||||
child: Icon(
|
||||
i < item.rating.round()
|
||||
? Icons.star_rounded
|
||||
: Icons.star_outline_rounded,
|
||||
color: const Color(0xFFE5A625),
|
||||
size: 24,
|
||||
),
|
||||
);
|
||||
}),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
@@ -478,7 +498,7 @@ class _TopProfessionalsSectionState
|
||||
|
||||
Widget _buildShimmerCards() {
|
||||
return SizedBox(
|
||||
height: 480,
|
||||
height: 540,
|
||||
child: Shimmer.fromColors(
|
||||
baseColor: const Color(0xFFE0E0E0),
|
||||
highlightColor: const Color(0xFFF5F5F5),
|
||||
@@ -492,7 +512,7 @@ class _TopProfessionalsSectionState
|
||||
children: [
|
||||
// Image placeholder
|
||||
Container(
|
||||
height: 192,
|
||||
height: 226,
|
||||
decoration: const BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.vertical(top: Radius.circular(15)),
|
||||
@@ -558,7 +578,7 @@ class _TopProfessionalsSectionState
|
||||
Widget _buildAvatarPlaceholder() {
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
height: 192,
|
||||
height: 226,
|
||||
color: AppColors.gradientStart,
|
||||
child: const Icon(Icons.person, size: 60, color: AppColors.primaryDark),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user