How to go to specific screen on click notification? i used cloud function in javascript and when i click on the notification, it open me the app not the specific screen
_fcm.configure(
onMessage: (Map<String, dynamic> message) async {
print("onMessage: $message");
getOrder(message['data']['order_id']);
showDialog(
context: context,
builder: (context) => AlertDialog(
content: ListTile(
title: Text(message['notification']['title']),
subtitle: Text(message['notification']['body']),
),
actions: <Widget>[
FlatButton(
child: Text('Ok'),
onPressed: () => Navigator.of(context).pop(),
),
],
),
);
},
onLaunch: (Map<String, dynamic> message) async {
print("onLaunch: $message");
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => DetailOrder()));
},
onResume: (Map<String, dynamic> message) async {
print("onResume: $message");
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => DetailOrder()));
},
);