LMChatButton
File location
button.dart
LMChatButton
is a customizable button widget used within the chat interface. It supports icons, text, and state management for active and inactive modes.
Properties
isActive
(bool
)
Indicates whether the button is active or inactive.text
(LMChatText?
)
The text to display within the button.style
(LMChatButtonStyle?
)
Customizes the button's appearance.onTap
(VoidCallback?
)
Callback triggered when the button is tapped.
Note: These properties are only a subset. More can be found inside the widget class.
Styling
LMChatButtonStyle
File location
button.dart
LMChatButtonStyle
defines the visual appearance of the button, including size, padding, colors, and icon placement.
Property | Type | Description | Required | Default |
---|---|---|---|---|
backgroundColor | Color? | Background color of the button | No | Colors.transparent |
borderRadius | double? | Border radius of the button | No | 8.0 |
padding | EdgeInsets? | Padding around the button | No | EdgeInsets.all(4) |
Note: These properties are only a subset. More can be found inside the style class.
Example Usage
final chatButton = LMChatButton(
text: LMChatText('Send'),
isActive: true,
onTap: () => print('Button tapped'),
style: LMChatButtonStyle(
backgroundColor: Colors.blue,
borderRadius: 8.0,
padding: EdgeInsets.all(8.0),
),
);