Chat / Flutter
Current version: v3
Chat Flutter v3
Chat Flutter
Chat
Flutter
Home
/
Chat
/
Flutter
/
User

Update user profile

You can update a user's nickname and profile image with a profile URL using updateCurrentUserInfo(). A user's profile image can be a JPG (.jpg), JPEG (.jpeg), or PNG (.png) file of up to 5 MB.

try {
    await sendbird.updateCurrentUserInfo(
        nickname: NICKNAME,
        fileInfo: FileInfo.fromUrl(url: PROFILE_URL)
    );
    // The current user's profile is successfully updated.
    // You could redraw the profile in a view in response to this operation.
}

Or you can directly upload a profile image using the FileInfo.fromData() constructor.

try {
    await sendbird.updateCurrentUserInfo(
        nickname: NICKNAME,
        fileInfo: FileInfo.fromData(file: PROFILE_DATA)
    );
    // The current user's profile is successfully updated.
    // You could redraw the profile in a view in response to this operation.
}