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
imageUrl
(String?
)
The URL of the profile picture.filePath
(String?
)
Path to the local image file.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.
Property | Type | Description | Required | Default |
---|---|---|---|---|
size | double? | Size of the profile picture | No | 48.0 |
borderRadius | double? | Border radius of the picture | No | 24.0 |
backgroundColor | Color? | Background color of the picture | No | Primary 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),
);