@Composable public fun ImageAvatar( painter: Painter, modifier: Modifier = Modifier, shape: Shape = ChatTheme.shapes.avatar, contentDescription: String? = null, onClick: (() -> Unit)? = null, ) { val clickableModifier: Modifier = if (onClick != null) { modifier.clickable( onClick = onClick, indication = rememberRipple(bounded = false), interactionSource = remember { MutableInteractionSource() } ) } else { modifier }  Image( modifier = clickableModifier.clip(shape), contentScale = ContentScale.Crop,painter = painter, contentDescription = contentDescription ) }
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.