feat: Implement notifications feature, enhance profile settings with new sections, and integrate Firebase configurations for multiple environments.

This commit is contained in:
pradeepkumar
2026-03-08 21:48:56 +05:30
parent 0362d7cfe0
commit 744b7b7ca8
24 changed files with 3413 additions and 557 deletions

View File

@@ -9,7 +9,10 @@ import 'package:real_estate_mobile/features/auth/presentation/providers/auth_pro
int _currentTabIndex(BuildContext context) {
final location = GoRouterState.of(context).matchedLocation;
if (location.startsWith('/messages')) return 2;
if (location.startsWith('/agents/search')) return 1;
if (location.startsWith('/agents/search') ||
location.startsWith('/agent/network')) {
return 1;
}
if (location.startsWith('/profile')) return 3;
return 0; // home and everything else
}
@@ -45,7 +48,16 @@ class AppBottomNavBar extends ConsumerWidget {
svgPath: 'assets/icons/nav_list_icon.svg',
fallbackIcon: Icons.list,
isSelected: selectedIndex == 1,
onTap: () => context.go('/agents/search'),
onTap: () {
final authState = ref.read(authProvider);
// Agents see their network, users see agent search
if (authState.status == AuthStatus.authenticated &&
authState.user?.role == 'AGENT') {
context.go('/agent/network');
} else {
context.go('/agents/search');
}
},
),
_NavItem(
svgPath: 'assets/icons/nav_messages_icon.svg',