I’m making a mobile app using flutter and I’m making push notifications using FCM.
I’m using flutter permission handler package to know whether the users allow the notification or not when they see the notification permission dialog.
However, the permission handler is not working. Whether the user allows the permission or not, the permission handler always says that the user denied the notification permission.
I tried using the other package, but it doesn’t work.
Please feel free to give me some any idea.
This is the code that I used.
var status = await Permission.notification.status;
developer.log('status : ${status.isDenied}');
2
Answers
For Android just try by adding POST_NOTIFICATIONS permission in your AndroidManifest
This package does not work on IOS out of the box. Referring to the documentation, you should add to your pod file this code to bottom block of the file:
then flutter clean and it should work (tested today)