Skip to main content

LMChatMediaShimmerWidget

File location
media_shimmer.dart

LMChatMediaShimmerWidget provides a shimmer effect to indicate loading of media elements, such as profile pictures or other containers. It can display both circular and rectangular placeholders.

Properties

  1. isPP (bool)
    Determines if the shimmer should display a circular avatar placeholder.

  2. height (double?)
    The height of the shimmer container.

  3. width (double?)
    The width of the shimmer container.$$

  4. style (LMChatMediaShimmerStyle?)
    Customizes the appearance of the shimmer effect.

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


Styling

LMChatMediaShimmerStyle

File location
media_shimmer.dart

LMChatMediaShimmerStyle defines the colors used in the shimmer effect, including the base and highlight colors.

PropertyTypeDescriptionRequiredDefault
baseColorColor?Base color of the shimmerNoColors.grey.shade100
highlightColorColor?Highlight color of the shimmerNoColors.grey.shade200

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


Example Usage

final mediaShimmer = LMChatMediaShimmerWidget(
isPP: true,
height: 50.0,
width: 50.0,
style: LMChatMediaShimmerStyle(
baseColor: Colors.grey.shade300,
highlightColor: Colors.grey.shade100,
),
);