ActionItem class
ActionItem is the type of items displayed in CometChatAttachmentOptionSheet
ActionItem item = ActionItem(
id: '1',
title: 'Like',
icon: Icon(Icons.favorite),
iconTint: Colors.red,
background: Colors.white,
titleStyle: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.bold,
color: Colors.black,
),
onItemClick: () {
print('Like button clicked!');
},
);
Constructors
- ActionItem({required String id, required String title, CometChatAttachmentOptionSheetStyle? style, Widget? icon, dynamic onItemClick})
-
ActionItem constructor requires
idandtitlewhile initializing.const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → Widget?
-
icon is the icon for this action item
final
- id → String
-
id is an unique id for this action item
final
- onItemClick → dynamic
-
onItemClick is the callback function when this action item is selected
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- style → CometChatAttachmentOptionSheetStyle?
-
style is the style for this message composer action
final
- title → String
-
title is the name for this action item
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited