useEmojis method

dynamic useEmojis(
  1. BuildContext context,
  2. CometChatTheme theme
)

Implementation

useEmojis(BuildContext context, CometChatTheme theme) async {
  String? emoji = await showCometChatEmojiKeyboard(
      context: context,
      backgroundColor: theme.palette.getBackground(),
      titleStyle: TextStyle(
          fontSize: 17,
          fontWeight: theme.typography.name.fontWeight,
          color: theme.palette.getAccent()),
      categoryLabel: TextStyle(
          fontSize: theme.typography.caption1.fontSize,
          fontWeight: theme.typography.caption1.fontWeight,
          color: theme.palette.getAccent600()),
      dividerColor: theme.palette.getAccent100(),
      selectedCategoryIconColor: theme.palette.getPrimary(),
      unselectedCategoryIconColor: theme.palette.getAccent600());
  if (emoji != null) {
    if (!focusNode.hasFocus) {
      focusNode.requestFocus();
      CometChatUIEvents.hidePanel(
          composerId, CustomUIPosition.composerBottom);
    }
    _addEmojiToText(emoji);
  }
}