Skip to main content

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

  1. isPP (bool)
    Indicates whether the error is related to a profile picture (PP).

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

PropertyTypeDescriptionRequiredDefault
primaryColorColor?Primary color of the widgetNoInherited from theme
backgroundColorColor?Background color of the widgetNoDefault white
iconColorColor?Color for the error iconNoTheme 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,
),
);