I recevice a remote notification, and it will call the method below. In this method, I will judge which current route it is, And excute diffrent method.
jPush.addEventHandler(
onReceiveNotification: (Map<String, dynamic> message) async {
// How to get current display route here?
});
How to get current display route here? There is no context here. In main.dart, I define a navigatorKey.
MaterialApp(
title: '',
navigatorKey: MyRouters.navigatoeKey,
...)