fix: notification permission error
This commit is contained in:
parent
769d2c9bd7
commit
3f99bb5511
1 changed files with 3 additions and 4 deletions
|
@ -23,9 +23,8 @@ class NotificationService {
|
|||
Future<void> 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);
|
||||
|
|
Loading…
Add table
Reference in a new issue