-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Text replacement does not work #1890
Comments
@miguelcmedeiros I looked into this and it seems that the text input client doesn't call any callbacks when the user types a text that matches a configured replacement. Even Flutter's I'm not sure if there is some native API call for that, or if we need to query the configured replacements and implement the behavior ourselves. |
@angelosilvestre I tried the sample app in DartPad: https://dartpad.dev/?sample=google-ai-sdk Screen.Recording.2024-03-19.at.18.11.47.mov |
@miguelcmedeiros This seems to work on web only, it's the browser's hidden html input that makes it work. If we run the example app on web it does show the popover, but selecting the value causes a crash and the text isn't replaced: Screen.Recording.2024-03-19.at.20.48.27.movWe can fix that, but it will still be an incomplete solution, because it will only work on web. |
One minor detail is the same text replacements do work on iOS currently (in the Superlist app), likely because of the way the text suggestion bar above the keyboard handles replacements? 🤷♂️ |
@cammcnab Text replacement seems to work differently on iOS. On iOS, the IME generates the suggestions on the keyboard panel. On macOS, it seems the IME doesn't show automatically show the suggestion popover nor generate any signals for us to show a popover. |
Package Version
main
branch with commit hash 8a2a32fTo Reproduce
Actual behavior
Nothing happens.
Expected behavior
Assuming that "omw" is configured to be replaced as "On my way!", then the following should be shown:
Platform
All platforms.
Flutter version
Flutter master commit e278279a48f0479386c249cf18f26b29c6f9018f.
Additional context
It's possible to check which text replacements are configured on macOS here:
The text was updated successfully, but these errors were encountered: