setup fcm
This commit is contained in:
@@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:injectable/injectable.dart';
|
||||
|
||||
import 'common/utils/fcm_service.dart';
|
||||
import 'injection.dart';
|
||||
import 'presentation/app_widget.dart';
|
||||
|
||||
@@ -24,5 +25,13 @@ void main() async {
|
||||
kReleaseMode ? Environment.prod : Environment.dev,
|
||||
);
|
||||
|
||||
// Initialize FCM after dependencies are ready
|
||||
await getIt<FcmService>().initialize(
|
||||
onMessageTap: (message) {
|
||||
// TODO: handle navigation when notification is tapped
|
||||
debugPrint('[FCM] Navigate based on: ${message.data}');
|
||||
},
|
||||
);
|
||||
|
||||
runApp(const AppWidget());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user