updateUser method

Future<QBUser?> updateUser({
  1. String? login,
  2. String? newPassword,
  3. String? password,
  4. String? email,
  5. int? blobId,
  6. int? externalUserId,
  7. int? facebookId,
  8. int? twitterId,
  9. String? fullName,
  10. String? phone,
  11. String? website,
  12. String? customData,
  13. List<String>? tags,
})

Implementation

Future<QBUser?> updateUser(
    {String? login,
    String? newPassword,
    String? password,
    String? email,
    int? blobId,
    int? externalUserId,
    int? facebookId,
    int? twitterId,
    String? fullName,
    String? phone,
    String? website,
    String? customData,
    List<String>? tags}) async {
  Map<String, Object> data = Map();

  if (login != null) {
    data["login"] = login;
  }
  if (newPassword != null) {
    data["newPassword"] = newPassword;
  }
  if (password != null) {
    data["password"] = password;
  }
  if (email != null) {
    data["email"] = email;
  }
  if (blobId != null) {
    data["blobId"] = blobId;
  }
  if (externalUserId != null) {
    data["externalUserId"] = externalUserId;
  }
  if (facebookId != null) {
    data["facebookId"] = facebookId;
  }
  if (twitterId != null) {
    data["twitterId"] = twitterId;
  }
  if (fullName != null) {
    data["fullName"] = fullName;
  }
  if (phone != null) {
    data["phone"] = phone;
  }
  if (website != null) {
    data["website"] = website;
  }
  if (customData != null) {
    data["customData"] = customData;
  }
  if (tags != null) {
    data["tags"] = tags;
  }

  Map<Object?, Object?> map = await _usersModule.invokeMethod(UPDATE_METHOD, data);
  QBUser? qbUser = QBUserMapper.mapToQBUser(map);

  return qbUser;
}