Open bchhabra2490 opened 3 years ago
Same issue, Found Any Solution?
None of my Classes are Returning or Calling the Instance of Themself. But Yes the FCM Background Handler causes error here.
For Someone Else This might be helpful :
Future<void> initNotifs() async {
FirebaseMessaging.onMessage.listen((RemoteMessage message) async {
print("onMessage: $message");
});
final FirebaseMessaging messaging;
messaging = FirebaseMessaging.instance;
await messaging.getToken().then((c) => print(c));
await messaging
.subscribeToTopic('general')
.then((value) => print('subscribed to general'));
FirebaseMessaging.onBackgroundMessage(
PushNotificationsHandler.firebaseMessagingBackgroundHandler);
}
Comment the below part :
FirebaseMessaging.onBackgroundMessage(
PushNotificationsHandler.firebaseMessagingBackgroundHandler);
Or just handle it in some other Page/View
I am getting the error when I try to load the pdf from url. It shows the number of pages of pdf but then it crashes.
my usage - inside a Column(children:[])