Skip to main content

File Bubble

CometChatFileBubble is the content view for a MediaMessage if the media sent is a file.

Properties

PropertiesTypeDescription
fileUrlStringthe path of the image to display
fileMimeTypeStringthe mime type of the file
idintid to make file name unique
titleStringa text to display as name of the file
subtitleStringa text to display below the name of the file
downloadIconIconcustomize the icon to display to download the file
styleFileBubbleStyleused to customize appearance of this widget
themeCometChatThemeused to set custom theme

FileBubbleStyle

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

PropertiesTypeDescription
titleStyleTextStyleused to set style of the name of the file
subtitleStyleTextStyleused to set style of the text below the name of the file
downloadIconTintColorused to provide color to the download 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

CometChatFileBubble(
theme: cometChatTheme,
fileUrl: 'https://images.pexels.com/photos/1496372/pexels-photo-1496372.jpeg',
title: 'File bubble',
style: const FileBubbleStyle(borderRadius: 6),
)