buildEmoji method

Widget buildEmoji(
  1. Emoji emoji,
  2. double emojiSize,
  3. double emojiBoxSize
)

Build emoji cell

Implementation

Widget buildEmoji(Emoji emoji, double emojiSize, double emojiBoxSize) {
  return addSkinToneTargetIfAvailable(
    hasSkinTone: emoji.hasSkinTone,
    linkKey: emoji.emoji,
    child: EmojiCell.fromConfig(
      emoji: emoji,
      emojiSize: emojiSize,
      emojiBoxSize: emojiBoxSize,
      onEmojiSelected: widget.state.onEmojiSelected,
      config: widget.config,
      onSkinToneDialogRequested:
          (emojiBoxPosition, emoji, emojiSize, category) {
        closeSkinToneOverlay();
        if (!emoji.hasSkinTone || !widget.config.skinToneConfig.enabled) {
          return;
        }
        showSkinToneOverlay(
          emojiBoxPosition,
          emoji,
          emojiSize,
          null, // Todo: check if we can provide the category
          widget.config,
          _onSkinTonedEmojiSelected,
          links[emoji.emoji]!,
        );
      },
    ),
  );
}