I am trying to implement the 'Tagging users in comments' feature similar to Instagram.
Requirements:
- A list of users should be shown when a user types one or more characters after '@'.
- The term to be queried can be anywhere in the text and not just at the end.
- There can be more than one tagged user.
Found this answer for user-tagging in Flutter, but it shows a suggestion list only if the tag is at the end of the text while typing. It would be great if I could modify this behavior based on the current cursor position in the TextFormField
. I looked at the TextEditingController
API to find something similar but could not find anything useful.
Is there any way to get such information or am I missing something?