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
title
(LMChatText?
)
An optional title displayed at the top of the sheet.children
(List<Widget>
)
A list of child widgets displayed inside the bottom sheet.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.
Property | Type | Description | Required | Default |
---|---|---|---|---|
backgroundColor | Color? | Background color of the sheet | No | Inherited theme |
height | double? | Height of the bottom sheet | No | None |
borderRadius | BorderRadiusGeometry? | Border radius of the sheet | No | 8.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,
),
),
);