This commit is contained in:
lizandrogd
2023-08-22 17:21:11 -05:00
parent bb1a291bd9
commit a22d7efc27
+2 -20
View File
@@ -49,25 +49,6 @@ class _ServiceScreenState extends State<ServiceScreen> {
}
}
void _handleBackgroundMessage(RemoteMessage message) async {
final Map<String, dynamic> data = message.data;
if (data['click_action'] == 'FLUTTER_NOTIFICATION_CLICK') {
final String screen = data['screen'];
if (screen == 'solicitud') {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => SolicitudScreen()),
);
} else if (screen == 'misservicios') {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => MyServicesScreen()),
);
}
}
}
Future<void> sendPushNotification(String pro) async {
try {
@@ -88,7 +69,8 @@ class _ServiceScreenState extends State<ServiceScreen> {
'data': <String, dynamic>{
'click_action': 'FLUTTER_NOTIFICATION_CLICK',
'id': '1',
'status': 'done'
'status': 'done',
'screen':'solicitud'
},
'to': pro
},