Skip to main content

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

  1. userViewData (LMChatUserViewData)
    The user data to be displayed in the tile.

  2. onTap (VoidCallback?)
    Callback function triggered on tile tap.

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

PropertyTypeDescriptionRequiredDefault
backgroundColorColor?Background color of the tileNoTheme container
gapdouble?Space between elementsNo4.0
marginEdgeInsets?Margin around the tileNoEdgeInsets.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),
),
);