Skip to main content

LMChatDocumentThumbnail

File location
thumbnail.dart

LMChatDocumentThumbnail displays a thumbnail representation of a document within the chat interface, supporting overlays and custom styles.

Properties

  1. media (LMChatMediaModel)
    The media content for the document thumbnail.

  2. overlay (LMChatDocumentTile?)
    An optional overlay widget for the thumbnail.

  3. style (LMChatDocumentThumbnailStyle?)
    Customizes the appearance of the document thumbnail.

Note: These properties are only a subset. More can be found inside the widget class.


Styling

LMChatDocumentThumbnailStyle

File location
thumbnail.dart

LMChatDocumentThumbnailStyle defines the visual aspects of the document thumbnail, including size, border, and padding.

PropertyTypeDescriptionRequiredDefault
heightdouble?Height of the thumbnailNo100.0
borderRadiusBorderRadius?Border radius of the thumbnailNo8.0
backgroundColorColor?Background color of the thumbnailNoColors.white

Note: These properties are only a subset. More can be found inside the style class.


Example Usage

final documentThumbnail = LMChatDocumentThumbnail(
media: mediaData,
showOverlay: true,
style: LMChatDocumentThumbnailStyle(
height: 100.0,
borderRadius: BorderRadius.circular(8.0),
backgroundColor: Colors.white,
),
);