Closed DK15 closed 5 years ago
Off the top my head, you would use textfield.controller.text = “YOUR TEXT HERE"
On 5 Dec 2018, at 8:02 pm, Darshan Kawar notifications@github.com wrote:
I want to show the selected / clicked item from suggestion list in textfield. How do I do that ? I know textfield is now exposed in latest version, but I don’t how to use controller with autocomplete textfield. Please see my detailed question here :
https://stackoverflow.com/questions/53590156/how-to-set-value-in-autocompletetextfield https://stackoverflow.com/questions/53590156/how-to-set-value-in-autocompletetextfield — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/felixlucien/flutter-autocomplete-textfield/issues/14, or mute the thread https://github.com/notifications/unsubscribe-auth/AR4NDFRg4vTZLoxWUypHgRtgp-IBcwwRks5u14uvgaJpZM4ZCR9v.
So as in
itemSubmitted: (item) { setState(() => autocompletetextfield.textfield.controller.text = item. autocompleteterm); }
On 5 Dec 2018, at 8:04 pm, Felix Lucien felixmccuaig@gmail.com wrote:
Off the top my head, you would use textfield.controller.text = “YOUR TEXT HERE"
On 5 Dec 2018, at 8:02 pm, Darshan Kawar <notifications@github.com mailto:notifications@github.com> wrote:
I want to show the selected / clicked item from suggestion list in textfield. How do I do that ? I know textfield is now exposed in latest version, but I don’t how to use controller with autocomplete textfield. Please see my detailed question here :
https://stackoverflow.com/questions/53590156/how-to-set-value-in-autocompletetextfield https://stackoverflow.com/questions/53590156/how-to-set-value-in-autocompletetextfield — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/felixlucien/flutter-autocomplete-textfield/issues/14, or mute the thread https://github.com/notifications/unsubscribe-auth/AR4NDFRg4vTZLoxWUypHgRtgp-IBcwwRks5u14uvgaJpZM4ZCR9v.
Thanks, I will try that now.
That worked. I also had to set clearOnSubmit: false
to be able to show the value in textfield.
I want to show the selected / clicked item from suggestion list in textfield. How do I do that ? I know textfield is now exposed in latest version, but I don’t know how to use controller with autocomplete textfield. Please see my detailed question here :
https://stackoverflow.com/questions/53590156/how-to-set-value-in-autocompletetextfield