Skip to main content

Image Bubble

CometChatImageBubble is the content view for a MediaMessage if the media sent is an image.

Properties

PropertiesTypeDescription
imageUrlStringthe path of the image to display
placeholderImageStringthe path of the image from assets to display when the actual image is being fetched
placeHolderImagePackageNameStringthe package of the asset image to display when the actual image is being fetched
captionStringa text to display below the image
styleImageBubbleStyleused to customize appearance of this widget
themeCometChatThemeused to set custom theme
onClickFunction()custom action on tapping the image

ImageBubbleStyle

ImageBubbleStyle is the class containing attributes to customize appearance of this widget.

PropertiesTypeDescription
captionStyleTextStyleused to set style of the caption text
heightdoubleused to set height
widthdoubleused to set width
backgroundColorused to set background color
gradientGradientused to set a gradient background
borderBoxBorderused to set border
borderRadiusdoubleused to set border radius

Usage

CometChatImageBubble(
theme: cometChatTheme,
imageUrl:'https://data-us.cometchat.io/208434241880dc4d/media/1676951632_1179067617_0bb4ab5734e38db8b6fce07a5a912b84.jpg',,
style: const ImageBubbleStyle(
borderRadius: 8,
)
)