-
Notifications
You must be signed in to change notification settings - Fork 26
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
feat: added autocomplete options to url input #128
base: main
Are you sure you want to change the base?
Conversation
lib/screens/login_screen.dart
Outdated
@@ -266,3 +259,68 @@ class LoginScreen extends HookConsumerWidget { | |||
.trim(); | |||
} | |||
} | |||
|
|||
class UrlFieldInput extends ConsumerWidget { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please extract the widget to another file.
Im abroad and can’t test this, but I’m curious if tab-to-complete works with this. Does anybody know? |
I tried unsuccessfully to add the shortcut; my best guess is that the textfield is capturing the tab event preventing the shortcut to execute. |
i am not sure how to disable that behaviour |
Can we extend TextField? |
Probably, but I don't think textfield itself is the issue its something related to focus and focus node |
tab.mp4The flickering is me pressing tab |
Just glancing but maybe DefaultTextEditingAction |
I tried it still the same behavior, the autocomplete is made up of 2 parts a textfield and a listview that displays the options, now I am not sure if focus is passed to the listview or remains with textfield. which I believe is the issue, If the focus remains with textfield (which I suspect it is) when we press tab the textfield attempts to go to the next field which resets autocomplete causing the behavior in the video. but I could be wrong and its not any of the above |
yeah i changed the shortcut to ctrl_space it still wont work I am pretty sure it's a focus issue |
Implemented #127, had to make a custom autocomplete because the default one does not accept a controller and defaults to maxwidth.
If no addresses are found:
If previous address are present: