Skip to main content

LMChatDocumentPreview

File location
preview.dart

LMChatDocumentPreview displays a preview of a document with customizable styles, supporting media attachment management and flexible layouts.

Properties

  1. media (LMChatMediaModel)
    The media content to be displayed in the preview.

  2. style (LMChatDocumentPreviewStyle?)
    Customizes the appearance of the document preview.

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


Styling

LMChatDocumentPreviewStyle

File location
preview.dart

LMChatDocumentPreviewStyle defines the visual aspects of the document preview, such as colors, padding, and borders.

PropertyTypeDescriptionRequiredDefault
backgroundColorColor?Background color of the previewNoColors.white
borderRadiusBorderRadius?Border radius of the previewNo8.0
paddingEdgeInsets?Padding inside the previewNoEdgeInsets.all(8)

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


Example Usage

final documentPreview = LMChatDocumentPreview(
media: mediaData,
style: LMChatDocumentPreviewStyle(
backgroundColor: Colors.grey[200],
borderRadius: BorderRadius.circular(8.0),
padding: EdgeInsets.all(8.0),
),
);