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
media
(LMChatMediaModel
)
The media model containing the video information.style
(LMChatVideoStyle?
)
Controls the appearance and behavior of the video widget.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.
Property | Type | Description | Required | Default |
---|---|---|---|---|
width | double? | Width of the video container | No | None |
borderRadius | BorderRadius? | Border radius of the video | No | 8.0 |
autoPlay | bool? | Auto-play the video | No | false |
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'),
),
);