UserAvatar
The default user avatar content.
This component displays the user's uploaded image or falls back to their initials if no image is available. It is commonly used in message lists, headers, and user profiles.
Parameters
The user whose avatar will be displayed.
The modifier to be applied to this layout.
The presence indicator to overlay on the avatar. Defaults to AvatarPresenceIndicator.None.
Whether to draw a border around the avatar to provide contrast against the background.
Deprecated
Use the overload that takes an AvatarPresenceIndicator. showIndicator showed a grey dot when the user was offline; pass an explicit indicator to control the online, offline, and hidden states.
Replace with
import io.getstream.chat.android.compose.ui.components.avatar.AvatarPresenceIndicator
UserAvatar(user, modifier, if (showIndicator) (if (user.online) AvatarPresenceIndicator.Online else AvatarPresenceIndicator.Offline) else AvatarPresenceIndicator.None, showBorder)The default user avatar content.
Parameters
The user whose avatar will be displayed.
The modifier to be applied to this layout.
Whether to overlay a status indicator to show whether the user is online.
Whether to draw a border around the avatar to provide contrast against the background.