feat: Implement initial filtering for agent search from the home screen, enable footer navigation, and add provider stability checks.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:real_estate_mobile/core/constants/app_colors.dart';
|
||||
import 'package:real_estate_mobile/features/home/presentation/widgets/featured_professionals_section.dart';
|
||||
import 'package:real_estate_mobile/features/home/presentation/widgets/features_section.dart';
|
||||
@@ -41,13 +42,20 @@ class HomeScreen extends ConsumerWidget {
|
||||
const SizedBox(height: 40),
|
||||
|
||||
// Footer
|
||||
_buildFooter(),
|
||||
_buildFooter(context),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildFooter() {
|
||||
static const _footerRoutes = <String, String>{
|
||||
'Home': '/home',
|
||||
'About': '/about',
|
||||
'Contact': '/contact',
|
||||
'FAQ': '/faq',
|
||||
};
|
||||
|
||||
Widget _buildFooter(BuildContext context) {
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 24),
|
||||
@@ -64,13 +72,13 @@ class HomeScreen extends ConsumerWidget {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
_buildFooterLink('Home'),
|
||||
_buildFooterLink(context, 'Home'),
|
||||
_buildFooterDot(),
|
||||
_buildFooterLink('About'),
|
||||
_buildFooterLink(context, 'About'),
|
||||
_buildFooterDot(),
|
||||
_buildFooterLink('Contact'),
|
||||
_buildFooterLink(context, 'Contact'),
|
||||
_buildFooterDot(),
|
||||
_buildFooterLink('FAQ'),
|
||||
_buildFooterLink(context, 'FAQ'),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
@@ -88,14 +96,20 @@ class HomeScreen extends ConsumerWidget {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildFooterLink(String text) {
|
||||
return Text(
|
||||
text,
|
||||
style: const TextStyle(
|
||||
fontFamily: 'SourceSerif4',
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: Colors.white,
|
||||
Widget _buildFooterLink(BuildContext context, String text) {
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
final route = _footerRoutes[text];
|
||||
if (route != null) context.go(route);
|
||||
},
|
||||
child: Text(
|
||||
text,
|
||||
style: const TextStyle(
|
||||
fontFamily: 'SourceSerif4',
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user