ChannelAvatar
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.
Based on the state of the Channel and the number of members, it shows different types of images.
Parameters
channel
The channel whose data we need to show.
currentUser
The current user, used to determine avatar data.
modifier
Modifier for styling.
shape
The shape of the avatar.
textStyle
The TextStyle that will be used for the initials.
groupAvatarTextStyle
The TextStyle that will be used for the initials in sectioned avatar.
showOnlineIndicator
If we show online indicator or not.
onlineIndicatorAlignment
The alignment of online indicator.
onlineIndicator
Custom composable that allows to replace the default online indicator.
contentDescription
The description to use for the avatar.
onClick
The handler when the user clicks on the avatar.