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.