LMChatTile
File location
tile.dart
LMChatTile is a reusable widget for displaying content in a tile layout. It supports customizable child elements like leading icons, titles, subtitles, and trailing widgets.
Properties
leading(Widget?)
An optional widget displayed at the start of the tile.title(Widget?)
The main title of the tile.onTap(VoidCallback?)
Callback function triggered when the tile is tapped.style(LMChatTileStyle?)
Defines the appearance of the tile.
Note: These properties are only a subset. More can be found inside the widget class.
Styling
LMChatTileStyle
File location
tile.dart
LMChatTileStyle allows for customization of the tile's appearance, including layout, colors, and spacing.
| Property | Type | Description | Required | Default |
|---|---|---|---|---|
backgroundColor | Color? | Background color of the tile | No | Transparent |
borderRadius | double? | Border radius of the tile | No | 0.0 |
padding | EdgeInsets? | Padding inside the tile | No | EdgeInsets.all(12) |
height | double? | Height of the tile | No | None |
Note: These properties are only a subset. More can be found inside the style class.
Example Usage
final chatTile = LMChatTile(
leading: Icon(Icons.person),
title: Text('John Doe'),
subtitle: Text('Active now'),
trailing: Icon(Icons.arrow_forward),
onTap: () => print('Tile tapped'),
style: LMChatTileStyle(
backgroundColor: Colors.white,
borderRadius: 8.0,
padding: EdgeInsets.all(16.0),
),
);