jj
This commit is contained in:
@@ -74,6 +74,7 @@ class Professional {
|
|||||||
' longitude: $longitude,\n'
|
' longitude: $longitude,\n'
|
||||||
' professionalEspecializado: ${getEspecializaciones()}\n'
|
' professionalEspecializado: ${getEspecializaciones()}\n'
|
||||||
' tarifa: $tarifa,\n'
|
' tarifa: $tarifa,\n'
|
||||||
|
' token: $token,\n'
|
||||||
'}';
|
'}';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ class _ServiceScreenState extends State<ServiceScreen> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> sendPushNotification(String token) async {
|
Future<void> sendPushNotification(String pro) async {
|
||||||
try {
|
try {
|
||||||
http.Response response = await http.post(
|
http.Response response = await http.post(
|
||||||
Uri.parse('https://fcm.googleapis.com/fcm/send'),
|
Uri.parse('https://fcm.googleapis.com/fcm/send'),
|
||||||
@@ -68,12 +68,12 @@ class _ServiceScreenState extends State<ServiceScreen> {
|
|||||||
'id': '1',
|
'id': '1',
|
||||||
'status': 'done'
|
'status': 'done'
|
||||||
},
|
},
|
||||||
'to': token,
|
'to': pro,
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
print(token);
|
print(pro);
|
||||||
print(response);
|
print(response);
|
||||||
response;
|
response;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user