CometChatCardButtonElement class final
A tappable button element with label, optional icon, and an action.
Supports variants: filled, outlined, and text.
- Inheritance
-
- Object
- CometChatCardElement
- CometChatCardButtonElement
Constructors
- CometChatCardButtonElement({required String id, required String label, CometChatCardAction? action, String? variant, dynamic backgroundColor, dynamic textColor, dynamic borderColor, double? borderWidth, double? borderRadius, dynamic padding, double? fontSize, dynamic icon, String? iconPosition, dynamic size, bool? fullWidth, bool? disabled})
-
const
-
CometChatCardButtonElement.fromJson(Map<
String, dynamic> json) -
factory
Properties
- action → CometChatCardAction?
-
Action dispatched when the button is tapped.
final
- backgroundColor → dynamic
-
Background fill color.
final
- borderColor → dynamic
-
Border color.
final
- borderRadius → double?
-
Corner radius of the button.
final
- borderWidth → double?
-
Border stroke width in logical pixels.
final
- disabled → bool?
-
Whether the button is disabled and non-interactive.
final
- fontSize → double?
-
Font size of the label.
final
- fullWidth → bool?
-
Whether the button stretches to fill available width.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → dynamic
-
Optional icon URL string or theme-aware CometChatCardColorValue.
final
- iconPosition → String?
-
Position of the icon relative to the label (e.g.
left,right).final - id → String
-
Unique identifier for this element within the card.
finalinherited
- label → String
-
The button label text.
final
- padding → dynamic
-
Padding around the button content, as a number or per-edge map.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → dynamic
-
Button size: either a preset string ("small", "medium", "large")
or a numeric value (dp) for custom height.
final
- textColor → dynamic
-
Color of the label text.
final
- type → String
-
The element type discriminator (e.g.
text,image,row).finalinherited - variant → String?
-
Visual variant:
filled,outlined, ortext.final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited