Skip to main content

Video Bubble

CometChatVideoBubble is the content view for a MediaMessage if the media sent is a video.

Properties

PropertiesTypeDescription
videoUrlStringthe path of the video to play
thumbnailUrlStringused to set a custom thumbnail for the video
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
styleVideoBubbleStyleused to customize appearance of this widget
themeCometChatThemeused to set custom theme
playIconIconicon to display stacked on top of the bubble
onClickFunction()custom action on tapping the video bubble play icon

VideoBubbleStyle

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

PropertiesTypeDescription
playIconTintColorused to provide color to the video play icon
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

CometChatVideoBubble(
theme: cometChatTheme,
videoUrl:
'https://data-us.cometchat.io/208434241880dc4d/media/1676278931_975451502_6f3b8b7e82f806de85fe924361e2087d.mp4',
style: const VideoBubbleStyle(borderRadius: 8),
)