update
This commit is contained in:
@@ -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 {
|
Future<void> sendPushNotification(String pro) async {
|
||||||
try {
|
try {
|
||||||
@@ -88,7 +69,8 @@ class _ServiceScreenState extends State<ServiceScreen> {
|
|||||||
'data': <String, dynamic>{
|
'data': <String, dynamic>{
|
||||||
'click_action': 'FLUTTER_NOTIFICATION_CLICK',
|
'click_action': 'FLUTTER_NOTIFICATION_CLICK',
|
||||||
'id': '1',
|
'id': '1',
|
||||||
'status': 'done'
|
'status': 'done',
|
||||||
|
'screen':'solicitud'
|
||||||
},
|
},
|
||||||
'to': pro
|
'to': pro
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user