-
public final class UserAvatarKt
-
-
Method Summary
Modifier and Type Method Description final static UnitUserAvatar(User user, Modifier modifier, AvatarPresenceIndicator indicator, Boolean showBorder)The default user avatar content. final static UnitUserAvatar(User user, Modifier modifier, Boolean showIndicator, Boolean showBorder)The default user avatar content. -
-
Method Detail
-
UserAvatar
@Composable() final static Unit UserAvatar(User user, Modifier modifier, AvatarPresenceIndicator indicator, Boolean showBorder)
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:
user- The user whose avatar will be displayed.modifier- The modifier to be applied to this layout.indicator- The presence indicator to overlay on the avatar.showBorder- Whether to draw a border around the avatar to provide contrast against the background.
-
UserAvatar
@Deprecated(message = 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., replaceWith = @ReplaceWith(imports = {io.getstream.chat.android.compose.ui.components.avatar.AvatarPresenceIndicator}, expression = UserAvatar(user, modifier, if (showIndicator) (if (user.online) AvatarPresenceIndicator.Online else AvatarPresenceIndicator.Offline) else AvatarPresenceIndicator.None, showBorder)), level = DeprecationLevel.WARNING)@Composable() final static Unit UserAvatar(User user, Modifier modifier, Boolean showIndicator, Boolean showBorder)
The default user avatar content.
- Parameters:
user- The user whose avatar will be displayed.modifier- The modifier to be applied to this layout.showIndicator- Whether to overlay a status indicator to show whether the user is online.showBorder- Whether to draw a border around the avatar to provide contrast against the background.
-
-
-
-