Package 

Class UserAvatarKt

    • Method Summary

      Modifier and Type Method Description
      final static Unit UserAvatar(Modifier modifier, String userImage, String userName, Shape shape, ContentScale imageScale, String imageDescription, IntSize imageRequestSize, @DrawableRes() Integer loadingPlaceholder, @DrawableRes() Integer previewModePlaceholder, TextStyle textStyle, DpOffset textOffset, Boolean isShowingOnlineIndicator, OnlineIndicatorAlignment onlineIndicatorAlignment, Function1<BoxScope, Unit> onlineIndicator, Function0<Unit> onClick) Component that renders an image or a name as an avatar.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • UserAvatar

        @Composable() final static Unit UserAvatar(Modifier modifier, String userImage, String userName, Shape shape, ContentScale imageScale, String imageDescription, IntSize imageRequestSize, @DrawableRes() Integer loadingPlaceholder, @DrawableRes() Integer previewModePlaceholder, TextStyle textStyle, DpOffset textOffset, Boolean isShowingOnlineIndicator, OnlineIndicatorAlignment onlineIndicatorAlignment, Function1<BoxScope, Unit> onlineIndicator, Function0<Unit> onClick)

        Component that renders an image or a name as an avatar. If the image is null or unavailable, it uses the name initials. Can also show an "is online" indicator. If needed, the initials font size is gradually decreased automatically until the text fits within the avatar boundaries.

        Parameters:
        modifier - Modifier used for styling.
        userImage - The URL of the image to be displayed.
        userName - The name to be used for the initials.
        shape - The shape of the avatar.
        imageScale - The scale rule used for the image.
        imageDescription - The image content description for accessibility.
        imageRequestSize - The image size to be requested.
        loadingPlaceholder - Placeholder image to be displayed while loading the remote image.
        previewModePlaceholder - Placeholder image to be displayed in Compose previews (IDE).
        textStyle - The TextStyle to be used for the initials text.
        textOffset - Offset to be applied to the initials text.
        isShowingOnlineIndicator - Flag used to display/hide the "is online" indicator.
        onlineIndicatorAlignment - Alignment of the "is online" indicator.
        onlineIndicator - A custom composable to represent the "is online" indicator.
        onClick - Handler to be called when the user clicks on the avatar.