initializeNotifications method
Initialize push notifications.
Implementation
Future<void> initializeNotifications({
required String appId,
String? channelName,
}) async {
if (!await hasNotificationPermission()) {
await requestNotificationPermission();
}
await _initializeFirebaseMessaging();
await registerDeviceToken(appId);
_setForegroundMessageHandler();
_setNotificationOpenAppHandler();
}