Skip to main content

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

  1. 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.

PropertyTypeDescriptionRequiredDefault
heightdouble?Height of the shimmer containerNo80
widthdouble?Width of the shimmer containerNo60.w
borderRadiusBorderRadius?Border radius of the shimmerNoBorderRadius.circular(8)
baseColorColor?Base color of the shimmerNoColors.black26
highlightColorColor?Highlight color of the shimmerNoColors.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],
),
);