hey guys when I use onDidReceiveBackgroundNotificationResponse in flutter_local_notification I got an error can someone help me?
actually I want navigate to second page after user select my notification in background mode but I got this problem
Put the definition of function used as backgroundHandler outside of any class.
For example:
// If in main.dart
main() {
// ...
}
ClassABC {
void getLetter() => print('a and b');
}
// Notice how this is outside of classABC scope and main scope.
backgroundHandler() {
// Put handling code here.
}
For more clarity, could you post the whole page code?