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
isPP(bool)
Determines if the shimmer should display a circular avatar placeholder.height(double?)
The height of the shimmer container.width(double?)
The width of the shimmer container.$$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.
| Property | Type | Description | Required | Default |
|---|---|---|---|---|
baseColor | Color? | Base color of the shimmer | No | Colors.grey.shade100 |
highlightColor | Color? | Highlight color of the shimmer | No | Colors.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,
),
);