unregisterNotificationToken method Null safety
알림 토큰을 삭제합니다. 토큰 삭제시에도 마찬가지로 UI 렌더링 지연을 피하기 위해 await을 쓰지 않습니다.
Implementation
Future<void> unregisterNotificationToken() async {
try {
LogManager().addLog("알림 토큰 등록 해제 호출", screen: runtimeType.toString());
String deviceId = await getDeviceId();
reqDELETE(
path: '/api/engagement/endpoint/$deviceId',
).then((value) {
LogManager().addLog("알림 토큰 등록 해제 성공", screen: runtimeType.toString());
});
} catch (e) {
LogManager().addLog("알림 토큰 등록 해제 실패 $e", screen: runtimeType.toString());
}
}