Want to Detect virtual keyboard events in Flutter? I had a similar problem and I solved it in this way. Try to get your cursor position index in the text via TextEditingController and with that index get last typed value. Imagine below example is in TextField’s onChanged function which gives you inserted text.
Something like this:
String key = value.substring(_textController.selection.end-1, _textController.selection.end);
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.