feat: Implement notifications feature, enhance profile settings with new sections, and integrate Firebase configurations for multiple environments.
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user