Skip to main content

LMChatProfilePicture

File location
profile_picture.dart

LMChatProfilePicture displays a profile picture within the chat interface, supporting image URLs, local file paths, fallback text, and customizable overlays.

Properties

  1. imageUrl (String?)
    The URL of the profile picture.

  2. filePath (String?)
    Path to the local image file.

  3. style (LMChatProfilePictureStyle?)
    Customizes the appearance of the profile picture.

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


Styling

LMChatProfilePictureStyle

File location
profile_picture.dart

LMChatProfilePictureStyle defines the appearance of the profile picture, including size, borders, and background color.

PropertyTypeDescriptionRequiredDefault
sizedouble?Size of the profile pictureNo48.0
borderRadiusdouble?Border radius of the pictureNo24.0
backgroundColorColor?Background color of the pictureNoPrimary color

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


Example Usage

final profilePicture = LMChatProfilePicture(
imageUrl: 'https://example.com/image.png',
fallbackText: 'JD',
style: LMChatProfilePictureStyle(
size: 50.0,
borderRadius: 25.0,
backgroundColor: Colors.grey[300],
),
overlay: Icon(Icons.edit, color: Colors.white),
);