2026-02-24 03:19:55 +05:30
|
|
|
import 'package:flutter/material.dart';
|
2026-02-24 22:35:16 +05:30
|
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
2026-02-24 03:19:55 +05:30
|
|
|
import 'package:real_estate_mobile/core/constants/app_colors.dart';
|
2026-02-25 06:55:05 +05:30
|
|
|
import 'package:real_estate_mobile/features/home/presentation/widgets/featured_professionals_section.dart';
|
2026-02-24 03:19:55 +05:30
|
|
|
import 'package:real_estate_mobile/features/home/presentation/widgets/features_section.dart';
|
|
|
|
|
import 'package:real_estate_mobile/features/home/presentation/widgets/hero_section.dart';
|
|
|
|
|
import 'package:real_estate_mobile/features/home/presentation/widgets/home_header.dart';
|
|
|
|
|
import 'package:real_estate_mobile/features/home/presentation/widgets/testimonials_section.dart';
|
|
|
|
|
import 'package:real_estate_mobile/features/home/presentation/widgets/top_professionals_section.dart';
|
|
|
|
|
import 'package:real_estate_mobile/features/home/presentation/widgets/trust_stats_section.dart';
|
|
|
|
|
|
2026-02-24 22:35:16 +05:30
|
|
|
class HomeScreen extends StatefulWidget {
|
2026-02-24 03:19:55 +05:30
|
|
|
const HomeScreen({super.key});
|
|
|
|
|
|
2026-02-24 22:35:16 +05:30
|
|
|
@override
|
|
|
|
|
State<HomeScreen> createState() => _HomeScreenState();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class _HomeScreenState extends State<HomeScreen> {
|
|
|
|
|
int _selectedIndex = 0;
|
|
|
|
|
|
2026-02-24 03:19:55 +05:30
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return Scaffold(
|
2026-02-24 22:35:16 +05:30
|
|
|
body: _buildBody(),
|
|
|
|
|
bottomNavigationBar: _buildBottomNavBar(),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Widget _buildBody() {
|
|
|
|
|
// Only Home tab (index 0) has content for now
|
|
|
|
|
switch (_selectedIndex) {
|
|
|
|
|
case 0:
|
|
|
|
|
return _buildHomeContent();
|
|
|
|
|
case 1:
|
|
|
|
|
case 2:
|
|
|
|
|
case 3:
|
|
|
|
|
default:
|
|
|
|
|
return Center(
|
|
|
|
|
child: Text(
|
|
|
|
|
['Home', 'Listings', 'Messages', 'Profile'][_selectedIndex],
|
|
|
|
|
style: const TextStyle(
|
|
|
|
|
fontFamily: 'Fractul',
|
|
|
|
|
fontSize: 18,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
color: AppColors.primaryDark,
|
2026-02-24 03:19:55 +05:30
|
|
|
),
|
2026-02-24 22:35:16 +05:30
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Widget _buildHomeContent() {
|
|
|
|
|
return SingleChildScrollView(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
// Header
|
|
|
|
|
SafeArea(
|
|
|
|
|
bottom: false,
|
|
|
|
|
child: const HomeHeader(),
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
// Hero Section with Search
|
|
|
|
|
const HeroSection(),
|
|
|
|
|
const SizedBox(height: 40),
|
|
|
|
|
|
|
|
|
|
// Features Section
|
|
|
|
|
const FeaturesSection(),
|
|
|
|
|
const SizedBox(height: 40),
|
2026-02-24 03:19:55 +05:30
|
|
|
|
2026-02-25 06:55:05 +05:30
|
|
|
// Featured Professionals Carousel
|
|
|
|
|
const FeaturedProfessionalsSection(),
|
|
|
|
|
const SizedBox(height: 40),
|
|
|
|
|
|
|
|
|
|
// Top Professionals Section (Agents/Lenders tabs)
|
2026-02-24 22:35:16 +05:30
|
|
|
const TopProfessionalsSection(),
|
|
|
|
|
const SizedBox(height: 40),
|
2026-02-24 03:19:55 +05:30
|
|
|
|
2026-02-24 22:35:16 +05:30
|
|
|
// Trust & Stats Section
|
|
|
|
|
const TrustStatsSection(),
|
|
|
|
|
const SizedBox(height: 40),
|
2026-02-24 03:19:55 +05:30
|
|
|
|
2026-02-24 22:35:16 +05:30
|
|
|
// Testimonials Section
|
|
|
|
|
const TestimonialsSection(),
|
|
|
|
|
const SizedBox(height: 40),
|
2026-02-24 03:19:55 +05:30
|
|
|
|
2026-02-24 22:35:16 +05:30
|
|
|
// Footer
|
|
|
|
|
_buildFooter(),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ── Bottom Navigation Bar (matches Figma node 49:6485) ──
|
|
|
|
|
Widget _buildBottomNavBar() {
|
|
|
|
|
return Container(
|
|
|
|
|
decoration: const BoxDecoration(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
border: Border(
|
|
|
|
|
top: BorderSide(color: Color(0xFFE8E8E8), width: 1),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
child: SafeArea(
|
|
|
|
|
top: false,
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 12),
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
_buildNavItem(
|
|
|
|
|
index: 0,
|
|
|
|
|
svgPath: 'assets/icons/nav_home_icon.svg',
|
|
|
|
|
fallbackIcon: Icons.home,
|
|
|
|
|
),
|
|
|
|
|
_buildNavItem(
|
|
|
|
|
index: 1,
|
|
|
|
|
svgPath: 'assets/icons/nav_list_icon.svg',
|
|
|
|
|
fallbackIcon: Icons.list,
|
|
|
|
|
),
|
|
|
|
|
_buildNavItem(
|
|
|
|
|
index: 2,
|
|
|
|
|
svgPath: 'assets/icons/nav_messages_icon.svg',
|
|
|
|
|
fallbackIcon: Icons.chat_bubble,
|
|
|
|
|
),
|
|
|
|
|
_buildNavItem(
|
|
|
|
|
index: 3,
|
|
|
|
|
svgPath: 'assets/icons/nav_profile_icon.svg',
|
|
|
|
|
fallbackIcon: Icons.person_outline,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
2026-02-24 03:19:55 +05:30
|
|
|
|
2026-02-24 22:35:16 +05:30
|
|
|
Widget _buildNavItem({
|
|
|
|
|
required int index,
|
|
|
|
|
required String svgPath,
|
|
|
|
|
required IconData fallbackIcon,
|
|
|
|
|
}) {
|
|
|
|
|
final isSelected = _selectedIndex == index;
|
2026-02-24 03:19:55 +05:30
|
|
|
|
2026-02-24 22:35:16 +05:30
|
|
|
return GestureDetector(
|
|
|
|
|
onTap: () {
|
|
|
|
|
setState(() => _selectedIndex = index);
|
|
|
|
|
},
|
|
|
|
|
behavior: HitTestBehavior.opaque,
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
|
|
|
|
child: SvgPicture.asset(
|
|
|
|
|
svgPath,
|
|
|
|
|
width: 24,
|
|
|
|
|
height: 24,
|
|
|
|
|
colorFilter: isSelected
|
|
|
|
|
? const ColorFilter.mode(AppColors.primaryDark, BlendMode.srcIn)
|
|
|
|
|
: const ColorFilter.mode(AppColors.accentOrange, BlendMode.srcIn),
|
|
|
|
|
placeholderBuilder: (_) => Icon(
|
|
|
|
|
fallbackIcon,
|
|
|
|
|
size: 24,
|
|
|
|
|
color: isSelected ? AppColors.primaryDark : AppColors.accentOrange,
|
|
|
|
|
),
|
2026-02-24 03:19:55 +05:30
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Widget _buildFooter() {
|
|
|
|
|
return Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 24),
|
|
|
|
|
color: AppColors.primaryDark,
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Image.asset(
|
|
|
|
|
'assets/icons/logo.png',
|
|
|
|
|
width: 109,
|
|
|
|
|
height: 29,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
const SizedBox(height: 16),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
_buildFooterLink('Home'),
|
|
|
|
|
_buildFooterDot(),
|
|
|
|
|
_buildFooterLink('About'),
|
|
|
|
|
_buildFooterDot(),
|
|
|
|
|
_buildFooterLink('Contact'),
|
|
|
|
|
_buildFooterDot(),
|
|
|
|
|
_buildFooterLink('FAQ'),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
const SizedBox(height: 16),
|
|
|
|
|
Text(
|
|
|
|
|
'\u00A9 2025 RE-QuestN. All rights reserved.',
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontFamily: 'SourceSerif4',
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
|
color: Colors.white.withValues(alpha: 0.6),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Widget _buildFooterLink(String text) {
|
|
|
|
|
return Text(
|
|
|
|
|
text,
|
|
|
|
|
style: const TextStyle(
|
|
|
|
|
fontFamily: 'SourceSerif4',
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Widget _buildFooterDot() {
|
|
|
|
|
return Padding(
|
|
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 12),
|
|
|
|
|
child: Text(
|
|
|
|
|
'\u2022',
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
color: Colors.white.withValues(alpha: 0.5),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|