Skip to main content

LMChatBottomSheet

File location
bottom_sheet.dart

LMChatBottomSheet is a customizable bottom sheet widget used within the chat interface. It supports dynamic height, children widgets, and styling options.

Properties

  1. title (LMChatText?)
    An optional title displayed at the top of the sheet.

  2. children (List<Widget>)
    A list of child widgets displayed inside the bottom sheet.

  3. style (LMChatBottomSheetStyle?)
    Customizes the appearance of the bottom sheet.

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


Styling

LMChatBottomSheetStyle

File location
bottom_sheet.dart

LMChatBottomSheetStyle defines the appearance of the bottom sheet, including colors, padding, and drag bar options.

PropertyTypeDescriptionRequiredDefault
backgroundColorColor?Background color of the sheetNoInherited theme
heightdouble?Height of the bottom sheetNoNone
borderRadiusBorderRadiusGeometry?Border radius of the sheetNo8.0

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


Example Usage

final bottomSheet = LMChatBottomSheet(
title: LMChatText('Options'),
children: [
ListTile(title: Text('Item 1')),
ListTile(title: Text('Item 2')),
],
style: LMChatBottomSheetStyle(
backgroundColor: Colors.white,
height: 300.0,
borderRadius: BorderRadius.circular(16.0),
padding: EdgeInsets.all(16.0),
dragBar: Container(
width: 48,
height: 8,
color: Colors.grey,
),
),
);