getListItem method
Implementation
Widget getListItem(SuggestionListItem item, CometChatTheme theme) {
ListTile tile = ListTile(
onTap: () {
if (item.onTap != null) {
item.onTap!();
}
suggestions.clear();
_currentSearchKeyword = null;
_searcKeywordChanged = true;
},
title: Text(
item.title ?? "",
style: TextStyle(
fontSize: theme.typography.body.fontSize,
fontWeight: theme.typography.body.fontWeight,
fontFamily: theme.typography.body.fontFamily,
color: theme.palette.getAccent()),
),
leading: item.avatarName == null && item.avatarUrl == null
? null
: CometChatAvatar(
name: item.avatarName,
image: item.avatarUrl,
),
);
return tile;
}