setDeviceToken method
Implementation
Future<PamResponse> setDeviceToken(String deviceToken) async {
var saveToken = deviceToken;
var mediaKey = "";
if (Platform.isIOS) {
if (!kReleaseMode) {
saveToken = "_$deviceToken";
}
mediaKey = "ios_notification";
} else {
mediaKey = "android_notification";
}
var res =
await queue.add(() => postTracker("save_push", {mediaKey: saveToken}));
pref.saveString(deviceToken, SaveKey.pushKey);
return res;
}