CometChatMessageOption class

Model class for message options

CometChatMessageOption(
 id: 'id',
 title: 'title',
 icon: Icon(Icons.favorite),
 messageOptionSheetStyle: CometChatMessageOptionSheetStyle(
 backgroundColor: Colors.white,
 ),
 onClick: (BaseMessage baseMessage,
     CometChatMessageListController state) {}
 )

Constructors

CometChatMessageOption({required String id, required String title, Widget? icon, dynamic onItemClick(BaseMessage message, CometChatMessageListControllerProtocol state)?, CometChatMessageOptionSheetStyle? messageOptionSheetStyle})
CometChatMessageOption constructor requires id and title while initializing.

Properties

hashCode int
The hash code for this object.
no setterinherited
icon Widget?
icon of the option
getter/setter pair
id String
id of the option
getter/setter pair
messageOptionSheetStyle CometChatMessageOptionSheetStyle?
messageOptionSheetStyle is a CometChatMessageOptionSheetStyle that can be used to style message option sheet
final
onItemClick ↔ dynamic Function(BaseMessage message, CometChatMessageListControllerProtocol state)?
onClick of the option
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
title String
title of the option
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toActionItem() ActionItem
toActionItem converts CometChatMessageOption to ActionItem
toActionItemFromFunction(dynamic passedFunction(BaseMessage message, CometChatMessageListControllerProtocol state)?) ActionItem
toActionItemFromFunction takes a function as parameter and converts CometChatMessageOption to ActionItem with the function onClick as onItemClick
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited