LMChatDialog
File location
dialog.dart
LMChatDialog
is a customizable dialog widget for the chat interface. It supports displaying a title, content, and actions with flexible styling.
Properties
title
(Widget?
)
The title of the dialog.content
(Widget?
)
The main content displayed within the dialog.actions
(List<Widget>?
)
List of action buttons displayed at the bottom of the dialog.style
(LMChatDialogStyle?
)
Customizes the appearance of the dialog.
Note: These properties are only a subset. More can be found inside the widget class.
Styling
LMChatDialogStyle
File location
dialog.dart
LMChatDialogStyle
defines the visual appearance of the dialog, including background color and shape.
Property | Type | Description | Required | Default |
---|---|---|---|---|
backgroundColor | Color? | Background color of the dialog | No | Inherited theme |
shape | ShapeBorder? | Shape of the dialog | No | None |
Note: These properties are only a subset. More can be found inside the style class.
Example Usage
final chatDialog = LMChatDialog(
title: Text('Dialog Title'),
content: Text('This is the dialog content'),
actions: [
TextButton(
onPressed: () => print('Dialog Action'),
child: Text('Close'),
),
],
style: LMChatDialogStyle(
backgroundColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8.0),
),
),
);