LMChatUserTile
File location
user_tile.dart
LMChatUserTile represents a user in the chat interface using a customizable tile. It supports profile pictures, titles, and other UI elements.
Properties
userViewData(LMChatUserViewData)
The user data to be displayed in the tile.onTap(VoidCallback?)
Callback function triggered on tile tap.style(LMChatTileStyle?)
Customizes the appearance of the tile.
Note: These properties are only a subset. More can be found inside the widget class.
Styling
LMChatTileStyle
File location
user_tile.dart
LMChatTileStyle defines the appearance of the user tile, including background color, margin, and spacing between elements.
| Property | Type | Description | Required | Default |
|---|---|---|---|---|
backgroundColor | Color? | Background color of the tile | No | Theme container |
gap | double? | Space between elements | No | 4.0 |
margin | EdgeInsets? | Margin around the tile | No | EdgeInsets.only(bottom: 2) |
Note: These properties are only a subset. More can be found inside the style class.
Example Usage
final userTile = LMChatUserTile(
userViewData: userViewData,
onTap: () => print('User tile tapped'),
style: LMChatTileStyle(
backgroundColor: Colors.white,
gap: 8.0,
margin: EdgeInsets.all(8.0),
),
);