A NotificationPermissionService that wraps permission_handler to check, request, and open settings for notification permissions.
PushNotificationHandler.requestPermission() uses Firebase Messaging's built-in permission requestpermission_handler package added to pubspec.yamlNotificationPermissionService provides:isUndetermined - true when never askedisGranted - true when permission grantedisDenied - true when permission deniedrequestPermission() - triggers OS permission dialogopenAppSettings() - opens system Settings apppermission_handler package (not Firebase Messaging permission API)permission_handler added to pubspec.yamlrequestPermission() triggers native OS dialogopenAppSettings() opens app settings screenpermission_handler: ^11.3.1 to pubspec.yamlflutter pub getNSUserNotificationsUsageDescription if not presentNotificationPermissionService in lib/notifications/services/checkStatus() returning PermissionStatusisUndetermined, isGranted, isDenied gettersrequestPermission() returning boolopenAppSettings() using openAppSettings()LocatorService as LazySingletonflutter analyze to verify no issuesPermissionStatus.permanentlyDenied on Android means user must go to Settings
Reacties