getAIOptions method
List<CometChatMessageComposerAction>
getAIOptions(
- User? user,
- Group? group,
- CometChatTheme theme,
- BuildContext context,
- Map<
String, dynamic> ? id, - AIOptionsStyle? aiOptionStyle,
override
override this to alter attachment options in CometChatMessageComposer
Implementation
@override
List<CometChatMessageComposerAction> getAIOptions(
User? user,
Group? group,
CometChatTheme theme,
BuildContext context,
Map<String, dynamic>? id,
AIOptionsStyle? aiOptionStyle) {
List<CometChatMessageComposerAction> actionList =
super.getAIOptions(user, group, theme, context, id, aiOptionStyle);
if (id?["parentMessageId"] == null || id?["parentMessageId"] == 0) {
CometChatMessageComposerAction summaryAction =
CometChatMessageComposerAction(
title: "Summary",
id: getId(),
iconUrl: AssetConstants.repliesError,
onItemClick: (BuildContext context, User? user, Group? group) {
if (id?["parentMessageId"] == null ||
id?["parentMessageId"] == 0) {
showSummary(id, user, group, theme);
}
});
actionList.add(summaryAction);
}
return actionList;
}