LMChatIcon
File location
icon.dart
LMChatIcon
is a versatile widget used to display icons, SVGs, or PNGs within the chat interface. It supports multiple icon types with customizable styles for size, color, and fit.
Properties
type
(LMChatIconType
)
Defines the type of icon to display (e.g.,icon
,svg
, orpng
).icon
(IconData?
)
Icon data if the type isLMChatIconType.icon
.assetPath
(String?
)
Asset path for PNG or SVG icons.style
(LMChatIconStyle?
)
Customizes the appearance of the icon.
Note: These properties are only a subset. More can be found inside the widget class.
Styling
LMChatIconStyle
File location
icon.dart
LMChatIconStyle
defines the visual aspects of the icon, including size, padding, background color, and border.
Property | Type | Description | Required | Default |
---|---|---|---|---|
color | Color? | Color of the icon | No | Inherited theme |
size | double? | Size of the icon | No | 24.0 |
boxBorderRadius | double? | Border radius of the icon box | No | 0.0 |
Note: These properties are only a subset. More can be found inside the style class.
Example Usage
final chatIcon = LMChatIcon(
type: LMChatIconType.icon,
icon: Icons.message,
style: LMChatIconStyle(
color: Colors.blue,
size: 32.0,
boxBorderRadius: 8.0,
),
);