updateDeviceToken method

void updateDeviceToken({
  1. required String deviceToken,
})

will only called whenever device token changed

Implementation

void updateDeviceToken({
  required String deviceToken,
}) async {
  await sdkDataPersistenceService.persistDeviceToken(deviceToken);
  final device = await sdkDataPersistenceService.currentSdkParam();
  _callUpdateDevice(
      deviceToken: deviceToken, pushEnabled: device?.pushEnabled ?? true);
}