Skip to main content

Audio Bubble

CometChatAudioBubble is the content view for a MediaMessage if the media sent is an audio.

Properties

PropertiesTypeDescription
audioUrlStringthe 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
titleStringa text to display as name of the audio file
subtitleStringa text to display below the name of the audio file
styleAudioBubbleStyleused to customize appearance of this widget
themeCometChatThemeused to set custom theme
playIconIconcustomize the icon to display to play the audio
pauseIconIconcustomize the icon to display to pause the audio

AudioBubbleStyle

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

PropertiesTypeDescription
titleStyleTextStyleused to set style of the name of the audio file
subtitleStyleTextStyleused to set style of the text below the name of the audio file
playIconTintColorused to provide color to the audio play icon
pauseIconTintColorused to provide color to the audio pause 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

CometChatAudioBubble(
theme: cometChatTheme,
audioUrl: 'https://data-us.cometchat.io/2379614bd4db65dd/media/1682517916_1406731591_130612180fb2e657699814eb52817574.mp3',
title: 'Sample Audio',
)