Closed hatemragab closed 2 years ago
Fixed
void onEmojiSelected(Emoji emoji) {
String suffixText = text.substring(textOffset);
String prefixText = text.substring(0, textOffset);
textEditingController.text = prefixText + emoji.emoji + suffixText;
textEditingController.selection = TextSelection.fromPosition(
TextPosition(
offset: textOffset,
),
);
textOffset = textOffset+2;
}
how can I add emoji not at the end of the text field what if the user needs to add emoji inside text word or after the text field cursor