CometChatMessageOption class

Model class for message options

CometChatMessageOption(
 id: 'id',
 title: 'title',
 icon: 'assets url',
 packageName: 'assets package name'
 onClick: (BaseMessage baseMessage,
     CometChatMessageListController state) {}
 )

Constructors

CometChatMessageOption({required String id, required String title, String? icon, dynamic onClick(BaseMessage message, CometChatMessageListControllerProtocol state)?, String? packageName, Color? iconTint, TextStyle? titleStyle})
CometChatMessageOption constructor requires id and title while initializing.

Properties

backgroundColor Color?
backgroundColor of the option
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
icon String?
icon of the option
getter/setter pair
iconTint Color?
iconTint of the option
getter/setter pair
id String
id of the option
getter/setter pair
onClick ↔ dynamic Function(BaseMessage message, CometChatMessageListControllerProtocol state)?
onClick of the option
getter/setter pair
packageName String?
packageName 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
titleStyle TextStyle?
titleStyle 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