updateUserFCMToken method

Future<UserMessagingVO> updateUserFCMToken(
  1. String userId,
  2. FCMToken token
)

Implementation

Future<UserMessagingVO> updateUserFCMToken(
    String userId, FCMToken token) async {
  try {
    final userModel =
        await _userMessagingDataService.updateUserFCMToken(userId, token);
    return UserMessagingVO.fromModel(userModel);
  } catch (e) {
    if (e is RdevException) {
      throw UserMessagingServiceException(
          code: e.code, message: e.message, stackTrace: e.stackTrace);
    }
    throw UserMessagingServiceException();
  }
}