toActionItemFromFunction method
ActionItem
toActionItemFromFunction(
- dynamic passedFunction(
- BaseMessage message,
- CometChatMessageListControllerProtocol state
toActionItemFromFunction takes a function as parameter and converts CometChatMessageOption to ActionItem with the function onClick as onItemClick
Implementation
ActionItem toActionItemFromFunction(
Function(BaseMessage message, CometChatMessageListControllerProtocol state)?
passedFunction,
) {
return ActionItem(
id: id,
title: title,
iconUrl: icon,
onItemClick: passedFunction,
iconTint: iconTint,
titleStyle: titleStyle,
iconUrlPackageName: packageName,
background: backgroundColor);
}