feat: Redesign home screen sections with updated testimonial card styles, refined trust stats layout, and spacing adjustments.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:real_estate_mobile/core/constants/app_colors.dart';
|
||||
import 'package:real_estate_mobile/features/home/data/models/landing_page_content.dart';
|
||||
import 'package:real_estate_mobile/features/home/presentation/providers/home_provider.dart';
|
||||
@@ -68,48 +69,14 @@ class TestimonialsSection extends ConsumerWidget {
|
||||
? cmsTestimonials
|
||||
: _defaultContent;
|
||||
|
||||
final title = data.title.isNotEmpty ? data.title : _defaultContent.title;
|
||||
final subtitle =
|
||||
data.subtitle.isNotEmpty ? data.subtitle : _defaultContent.subtitle;
|
||||
final testimonials =
|
||||
data.testimonials.isNotEmpty ? data.testimonials : _defaultTestimonials;
|
||||
|
||||
return Column(
|
||||
children: [
|
||||
// Section header
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24),
|
||||
child: Column(
|
||||
children: [
|
||||
Text(
|
||||
title,
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
fontFamily: 'Fractul',
|
||||
fontSize: 25,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: AppColors.primaryDark,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
subtitle,
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
fontFamily: 'SourceSerif4',
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: AppColors.primaryDark,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
|
||||
// Testimonial cards carousel
|
||||
// Testimonial cards carousel (header is in TrustStatsSection above)
|
||||
SizedBox(
|
||||
height: 380,
|
||||
height: 420,
|
||||
child: ListView.builder(
|
||||
scrollDirection: Axis.horizontal,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24),
|
||||
@@ -126,37 +93,38 @@ class TestimonialsSection extends ConsumerWidget {
|
||||
|
||||
Widget _buildTestimonialCard(TestimonialItem testimonial) {
|
||||
return Container(
|
||||
width: 315,
|
||||
padding: const EdgeInsets.all(24),
|
||||
width: 300,
|
||||
padding: const EdgeInsets.all(20),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.primaryDark,
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(15),
|
||||
border: Border.all(
|
||||
color: AppColors.primaryDark.withValues(alpha: 0.1),
|
||||
width: 1,
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// Quote icon
|
||||
const Text(
|
||||
'\u201C',
|
||||
style: TextStyle(
|
||||
fontFamily: 'SourceSerif4',
|
||||
fontSize: 48,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: AppColors.accentOrange,
|
||||
height: 0.8,
|
||||
),
|
||||
// Quote icon SVG
|
||||
SvgPicture.asset(
|
||||
'assets/icons/quote_icon.svg',
|
||||
width: 23,
|
||||
height: 13,
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
const SizedBox(height: 12),
|
||||
// Title
|
||||
Text(
|
||||
testimonial.title,
|
||||
style: const TextStyle(
|
||||
fontFamily: 'Fractul',
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: Colors.white,
|
||||
color: AppColors.primaryDark,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
// Content
|
||||
Expanded(
|
||||
child: Text(
|
||||
testimonial.content,
|
||||
@@ -164,12 +132,12 @@ class TestimonialsSection extends ConsumerWidget {
|
||||
fontFamily: 'SourceSerif4',
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: Colors.white,
|
||||
color: AppColors.primaryDark,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
// Stars
|
||||
// Stars (yellow like Figma)
|
||||
Row(
|
||||
children: List.generate(
|
||||
testimonial.rating,
|
||||
@@ -177,30 +145,32 @@ class TestimonialsSection extends ConsumerWidget {
|
||||
padding: EdgeInsets.only(right: 4),
|
||||
child: Icon(
|
||||
Icons.star,
|
||||
color: AppColors.accentOrange,
|
||||
color: Color(0xFFFFDE21),
|
||||
size: 18,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
// Author info
|
||||
// Author name
|
||||
Text(
|
||||
testimonial.author,
|
||||
style: const TextStyle(
|
||||
fontFamily: 'SourceSerif4',
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Colors.white,
|
||||
color: AppColors.primaryDark,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 2),
|
||||
// Role
|
||||
Text(
|
||||
testimonial.role,
|
||||
style: const TextStyle(
|
||||
fontFamily: 'SourceSerif4',
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Colors.white,
|
||||
color: AppColors.primaryDark,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user