I use flutter_local_notifications
plugin and Firebase Messaging
library in Flutter on Android 10 and I am only reacting to notifications in the initState
method. I get the data from notification and show the appropriate screen. This works.
The problem is that the Notification access screen (screenshot) keeps popping up each time I restart the app, even though I granted all Notification access permissions. Does anyone know how to let this screen show just once?
final m = FirebaseMessaging();
@override
void initState() {
super.initState();
m.configure(
onMessage: (Map<String, dynamic> m) async {
// method call is here and works
return;
},
onResume: (Map<String, dynamic> m) {
// method call is here and works
return;
} ....
Solved by removing notifications: ^0.0.3
from pubspec.yaml
.
I did not use this dependency anyway.