feat: Add map navigation, enhance FCM deep linking, localize Google Places API, and refine activity display.

This commit is contained in:
Van Leemput Dayron
2025-12-04 11:24:30 +01:00
parent cf4c6447dd
commit e174c1274d
13 changed files with 991 additions and 383 deletions

View File

@@ -12,6 +12,8 @@ import '../blocs/user/user_event.dart';
import '../blocs/auth/auth_bloc.dart';
import '../blocs/auth/auth_event.dart';
import '../services/error_service.dart';
import '../services/notification_service.dart';
import '../services/map_navigation_service.dart';
class HomePage extends StatefulWidget {
const HomePage({super.key});
@@ -37,6 +39,24 @@ class _HomePageState extends State<HomePage> {
super.initState();
// Initialiser les données utilisateur
context.read<UserBloc>().add(UserInitialized());
// Setup notifications listener and check for initial message
final notificationService = NotificationService();
notificationService.startListening();
// Check for initial message after a slight delay to ensure the widget tree is fully built
WidgetsBinding.instance.addPostFrameCallback((_) {
notificationService.handleInitialMessage();
});
// Écouter les demandes de navigation vers la carte
context.read<MapNavigationService>().requestStream.listen((request) {
if (_currentIndex != 2) {
setState(() {
_currentIndex = 2;
});
}
});
}
Widget _buildPage(int index) {