getFileMessageBubble method

  1. @override
Widget getFileMessageBubble(
  1. String? fileUrl,
  2. String? fileMimeType,
  3. String? title,
  4. int? id,
  5. FileBubbleStyle? style,
  6. MediaMessage message,
  7. CometChatTheme theme,
)
override

override this to change view inside content view of message type MessageTypeConstants.file

Implementation

@override
Widget getFileMessageBubble(
    String? fileUrl,
    String? fileMimeType,
    String? title,
    int? id,
    FileBubbleStyle? style,
    MediaMessage message,
    CometChatTheme theme) {
  return CometChatFileBubble(
    key: UniqueKey(),
    fileUrl: fileUrl,
    fileMimeType: fileMimeType,
    style: FileBubbleStyle(
      background: style?.background,
      border: style?.border,
      borderRadius: style?.borderRadius,
      downloadIconTint: style?.downloadIconTint,
      gradient: style?.gradient,
      height: style?.height,
      width: style?.width,
      titleStyle: TextStyle(
              fontSize: theme.typography.name.fontSize,
              fontWeight: theme.typography.name.fontWeight,
              fontFamily: theme.typography.name.fontFamily,
              color: theme.palette.getAccent())
          .merge(style?.titleStyle),
      subtitleStyle: TextStyle(
              fontSize: theme.typography.subtitle2.fontSize,
              fontWeight: theme.typography.subtitle2.fontWeight,
              fontFamily: theme.typography.subtitle2.fontFamily,
              color: theme.palette.getAccent600())
          .merge(style?.subtitleStyle),
    ),
    title: title ?? "",
    id: id,
    theme: theme,
  );
}