Update send FCM Token to Server

This commit is contained in:
anhtunz
2025-03-14 22:35:54 +07:00
parent a6fa3b1572
commit c21667606a
4 changed files with 23 additions and 4 deletions

View File

@@ -49,6 +49,17 @@ class APIServices {
return response.body;
}
Future<int> sendNotificationToken(String token) async{
String uid = await getUID();
Map<String,dynamic> body = {
"user_id": uid,
"app_token": token
};
int statusCode = await NetworkManager.instance!.updateDataInServer(
APIPathConstants.NOTIFICATION_TOKEN_PATH, body);
return statusCode;
}
Future<void> logOut(BuildContext context) async {
showDialog(
context: context,