Skip to main content

Edit User Profile

To modify the user profile information in the LikeMinds Feed, use the editProfile() function.

Steps to Edit User Profile

  1. Build an EditProfileRequest object using the EditProfileRequestBuilder class.

  2. Call the editProfile() function using the instance of the LMFeedClient class.

  3. Use the response as per your requirement.

     // Provide user details for editing the profile
    String userUniqueId = "user_unique_id_here";
    String? name = "new_user_name";
    String? imageUrl = "new_user_profile_image_url";

    // Build the request object
    EditProfileRequest request = (EditProfileRequestBuilder()
    ..userUniqueId(userUniqueId)
    ..name(name)
    ..imageUrl(imageUrl))
    .build();

    // Get the response from calling the function
    final EditProfileResponse response = await lmFeedClient.editProfile(request);

    // Process the response, as per requirement
    if(response.success){
    // your function to handle successful profile edit
    handleSuccessfulEdit(response);
    } else {
    // your function to handle error message
    handleEditError(response.errorMessage);
    }

Models

EditProfileRequest

List of parameters for the EditProfileRequest class

VariableTypeDescriptionOptional
nameStringNew name of the user
imageUrlStringNew URL of the user's profile image
userUniqueIdStringUnique ID of the user
questionCommunityJoinList<QuestionCommunityJoin>List of question and community associations

EditProfileResponse

List of parameters for the EditProfileResponse class

VariableTypeDescriptionOptional
errorMessageStringError message in case of failure
successboolAPI success status