LMChatMediaErrorWidget
File location
error.dart
LMChatMediaErrorWidget
displays an error message when there is a failure in fetching media content. It offers customization for colors and icons based on different states.
Properties
isPP
(bool
)
Indicates whether the error is related to a profile picture (PP).style
(LMChatMediaErrorStyle?
)
Controls the appearance of the error widget.
Note: These properties are only a subset. More can be found inside the widget class.
Styling
LMChatMediaErrorStyle
File location
error.dart
LMChatMediaErrorStyle
defines the appearance of the media error widget, including primary color, background color, and text styles.
Property | Type | Description | Required | Default |
---|---|---|---|---|
primaryColor | Color? | Primary color of the widget | No | Inherited from theme |
backgroundColor | Color? | Background color of the widget | No | Default white |
iconColor | Color? | Color for the error icon | No | Theme default |
Note: These properties are only a subset. More can be found inside the style class.
Example Usage
final mediaErrorWidget = LMChatMediaErrorWidget(
isPP: true,
style: LMChatMediaErrorStyle(
primaryColor: Colors.red,
backgroundColor: Colors.white,
iconColor: Colors.black,
),
);