LMChatDocumentPreview
File location
preview.dart
LMChatDocumentPreview
displays a preview of a document with customizable styles, supporting media attachment management and flexible layouts.
Properties
media
(LMChatMediaModel
)
The media content to be displayed in the preview.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.
Property | Type | Description | Required | Default |
---|---|---|---|---|
backgroundColor | Color? | Background color of the preview | No | Colors.white |
borderRadius | BorderRadius? | Border radius of the preview | No | 8.0 |
padding | EdgeInsets? | Padding inside the preview | No | EdgeInsets.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),
),
);