From 3f99bb55116ada7f4f68fab17905bdf2947cc600 Mon Sep 17 00:00:00 2001 From: Prateek Sunal Date: Sat, 13 Apr 2024 14:00:23 +0530 Subject: [PATCH] fix: notification permission error --- mobile/lib/services/notification_service.dart | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mobile/lib/services/notification_service.dart b/mobile/lib/services/notification_service.dart index ca9be19b54..c860f427f8 100644 --- a/mobile/lib/services/notification_service.dart +++ b/mobile/lib/services/notification_service.dart @@ -23,9 +23,8 @@ class NotificationService { Future init( void Function( NotificationResponse notificationResponse, - ) - onNotificationTapped, - SharedPreferences preferences, + ) onNotificationTapped, + SharedPreferences preferences, ) async { _preferences = preferences; const androidSettings = AndroidInitializationSettings('notification_icon'); @@ -72,7 +71,7 @@ class NotificationService { result = await _notificationsPlugin .resolvePlatformSpecificImplementation< AndroidFlutterLocalNotificationsPlugin>() - ?.requestPermission(); + ?.requestNotificationsPermission(); } if (result != null) { await _preferences.setBool(keyGrantedNotificationPermission, result);