LMChatDocumentShimmer
File location
document_shimmer.dart
LMChatDocumentShimmer
provides a shimmer effect as a placeholder while a document tile is loading. It mimics the layout of the document tile to enhance user experience during loading.
Properties
style
(LMChatDocumentShimmerStyle?
)
Customizes the appearance and layout of the shimmer effect.
Note: These properties are only a subset. More can be found inside the widget class.
Styling
LMChatDocumentShimmerStyle
File location
document_shimmer.dart
LMChatDocumentShimmerStyle
defines the visual properties of the shimmer effect, including layout, colors, and sizes.
Property | Type | Description | Required | Default |
---|---|---|---|---|
height | double? | Height of the shimmer container | No | 80 |
width | double? | Width of the shimmer container | No | 60.w |
borderRadius | BorderRadius? | Border radius of the shimmer | No | BorderRadius.circular(8) |
baseColor | Color? | Base color of the shimmer | No | Colors.black26 |
highlightColor | Color? | Highlight color of the shimmer | No | Colors.black12 |
Example Usage
final documentShimmer = LMChatDocumentShimmer(
style: LMChatDocumentShimmerStyle.basic().copyWith(
height: 100.0,
width: 70.0,
borderRadius: BorderRadius.circular(12.0),
baseColor: Colors.grey[300],
highlightColor: Colors.grey[100],
),
);