feat: implement FCM push notifications via firebase_messaging

- Add firebase_core + firebase_messaging to pubspec.yaml
- Initialize Firebase in main.dart before runApp
- NotificationBloc: request permission, get FCM token, register with
  backend (PATCH /users/me/fcm-token), show local notification on
  foreground messages, refresh token on rotation
- app_view.dart: call initializePushNotifications() on authenticated state

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-06-18 12:43:41 -05:00
co-authored by Claude Sonnet 4.6
parent 5e92d2b908
commit 79f350e85f
4 changed files with 79 additions and 4 deletions
+2
View File
@@ -10,6 +10,8 @@ environment:
dependencies:
animate_do: ^3.0.2
firebase_core: ^3.0.0
firebase_messaging: ^15.0.0
animated_splash_screen: ^1.3.0
chat_repository:
path: packages/chat_repository