Skip to main content

LMChatVideo

File location
video.dart

LMChatVideo is a widget that plays video content within the chat interface, supporting customization through style and playback controls.

Properties

  1. media (LMChatMediaModel)
    The media model containing the video information.

  2. style (LMChatVideoStyle?)
    Controls the appearance and behavior of the video widget.

  3. muteButton (LMChatButtonBuilder?)
    Custom builder for the mute button.

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


Styling

LMChatVideoStyle

File location
video.dart

LMChatVideoStyle allows you to customize the video widget, including size, borders, controls, and playback behavior.

PropertyTypeDescriptionRequiredDefault
widthdouble?Width of the video containerNoNone
borderRadiusBorderRadius?Border radius of the videoNo8.0
autoPlaybool?Auto-play the videoNofalse

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


Example Usage

final videoWidget = LMChatVideo(
media: mediaData,
style: LMChatVideoStyle(
width: 300.0,
borderRadius: BorderRadius.circular(8.0),
autoPlay: true,
),
muteButton: (context) => IconButton(
icon: Icon(Icons.volume_off),
onPressed: () => print('Mute toggled'),
),
);