refactor: update Top Professionals section to source agent and lender data from CMS content and adjust CTA button text.
This commit is contained in:
@@ -31,6 +31,9 @@ const _defaultContent = TestimonialsContent(
|
||||
const _statIconMap = {
|
||||
'cities': ('assets/icons/cities_icon.svg', Icons.location_city),
|
||||
'properties': ('assets/icons/properties_icon.svg', Icons.home_work),
|
||||
// CMS web-path keys
|
||||
'/assets/icons/cities-icon.svg': ('assets/icons/cities_icon.svg', Icons.location_city),
|
||||
'/assets/icons/properties-icon.svg': ('assets/icons/properties_icon.svg', Icons.home_work),
|
||||
};
|
||||
|
||||
class TrustStatsSection extends ConsumerWidget {
|
||||
@@ -49,6 +52,9 @@ class TrustStatsSection extends ConsumerWidget {
|
||||
data.subtitle.isNotEmpty ? data.subtitle : _defaultContent.subtitle;
|
||||
final stats =
|
||||
data.stats.isNotEmpty ? data.stats : _defaultContent.stats;
|
||||
final ratingInfo = data.ratingInfo.isNotEmpty
|
||||
? data.ratingInfo
|
||||
: _defaultContent.ratingInfo;
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24),
|
||||
@@ -76,6 +82,17 @@ class TrustStatsSection extends ConsumerWidget {
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Text(
|
||||
ratingInfo,
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
fontFamily: 'SourceSerif4',
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: AppColors.primaryDark,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
const Divider(color: AppColors.divider),
|
||||
const SizedBox(height: 16),
|
||||
// Stats (group centered, content left-aligned)
|
||||
@@ -114,10 +131,9 @@ class TrustStatsSection extends ConsumerWidget {
|
||||
svgPath,
|
||||
width: 27,
|
||||
height: 27,
|
||||
placeholderBuilder: (_) => Icon(
|
||||
fallbackIcon,
|
||||
size: 27,
|
||||
color: AppColors.accentOrange,
|
||||
colorFilter: const ColorFilter.mode(
|
||||
AppColors.accentOrange,
|
||||
BlendMode.srcIn,
|
||||
),
|
||||
)
|
||||
: Icon(
|
||||
|
||||
Reference in New Issue
Block a user