Package-level declarations

Functions

Link copied to clipboard
fun Avatar(imageUrl: String, initials: String, modifier: Modifier = Modifier, shape: Shape = ChatTheme.shapes.avatar, textStyle: TextStyle = ChatTheme.typography.title3Bold, placeholderPainter: Painter? = null, contentDescription: String? = null, initialsAvatarOffset: DpOffset = DpOffset(0.dp, 0.dp), onClick: () -> Unit? = null)

An avatar that renders an image from the provided image URL. In case the image URL was empty or there was an error loading the image, it falls back to the initials avatar.

Link copied to clipboard
fun ChannelAvatar(channel: Channel, currentUser: User?, modifier: Modifier = Modifier, shape: Shape = ChatTheme.shapes.avatar, textStyle: TextStyle = ChatTheme.typography.title3Bold, groupAvatarTextStyle: TextStyle = ChatTheme.typography.captionBold, showOnlineIndicator: Boolean = true, onlineIndicatorAlignment: OnlineIndicatorAlignment = OnlineIndicatorAlignment.TopEnd, onlineIndicator: @Composable BoxScope.() -> Unit = { DefaultOnlineIndicator(onlineIndicatorAlignment) }, contentDescription: String? = null, onClick: () -> Unit? = null)

Represents the Channel avatar that's shown when browsing channels or when you open the Messages screen.

Link copied to clipboard
fun GroupAvatar(users: List<User>, modifier: Modifier = Modifier, shape: Shape = ChatTheme.shapes.avatar, textStyle: TextStyle = ChatTheme.typography.captionBold, onClick: () -> Unit? = null)

Represents an avatar with a matrix of user images or initials.

Link copied to clipboard
fun ImageAvatar(painter: Painter, modifier: Modifier = Modifier, shape: Shape = ChatTheme.shapes.avatar, contentDescription: String? = null, onClick: () -> Unit? = null)

Renders an image the painter provides. It allows for customization, uses the 'avatar' shape from ChatTheme.shapes for the clipping and exposes an onClick action.

Link copied to clipboard
fun InitialsAvatar(initials: String, modifier: Modifier = Modifier, shape: Shape = ChatTheme.shapes.avatar, textStyle: TextStyle = ChatTheme.typography.title3Bold, avatarOffset: DpOffset = DpOffset(0.dp, 0.dp), onClick: () -> Unit? = null)

Represents a special avatar case when we need to show the initials instead of an image. Usually happens when there are no images to show in the avatar.

Link copied to clipboard
fun UserAvatar(user: User, modifier: Modifier = Modifier, shape: Shape = ChatTheme.shapes.avatar, textStyle: TextStyle = ChatTheme.typography.title3Bold, contentDescription: String? = null, showOnlineIndicator: Boolean = true, onlineIndicatorAlignment: OnlineIndicatorAlignment = OnlineIndicatorAlignment.TopEnd, initialsAvatarOffset: DpOffset = DpOffset(0.dp, 0.dp), onlineIndicator: @Composable BoxScope.() -> Unit = { DefaultOnlineIndicator(onlineIndicatorAlignment) }, onClick: () -> Unit? = null)

Represents the User avatar that's shown on the Messages screen or in headers of DMs.