We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm coming from your tutorial here:
https://blog.logrocket.com/implementing-local-notifications-in-flutter/
The problem in your tutorial is that in the singleton there's no context,so it's impossible to use Navigator to handle notifications.
To see the problem clearly just replace the current selectNotification which does nothing, to the code that was mentioned in the tutorial:
Future selectNotification(String? payload) async { await Navigator.push( context, MaterialPageRoute<void>(builder: (context) => SecondScreen(payload)), ); }
to get the error that context was not defined.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm coming from your tutorial here:
https://blog.logrocket.com/implementing-local-notifications-in-flutter/
The problem in your tutorial is that in the singleton there's no context,so it's impossible to use Navigator to handle notifications.
To see the problem clearly just replace the current selectNotification which does nothing, to the code that was mentioned in the tutorial:
to get the error that context was not defined.
The text was updated successfully, but these errors were encountered: