/ SDKs / Flutter
SDKs
Chat SDKs Flutter v3
Chat SDKs Flutter
Chat SDKs
Flutter
Version 3
Sendbird Chat SDK v3 for Flutter is no longer supported as a new version is released. Check out our latest Chat SDK v4

Update user profile

Copy link

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.
}