Skip to main content

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

  1. title (Widget?)
    The title of the dialog.

  2. content (Widget?)
    The main content displayed within the dialog.

  3. actions (List<Widget>?)
    List of action buttons displayed at the bottom of the dialog.

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

PropertyTypeDescriptionRequiredDefault
backgroundColorColor?Background color of the dialogNoInherited theme
shapeShapeBorder?Shape of the dialogNoNone

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),
),
),
);