[英]How can I send data from ListView into TextField in Flutter?
Since my problem is not with a code, I will explain it to the images.由于我的问题不在于代码,我将向图像解释。
There are 3 fields that I think are textFields (Müşteri, Marka, Ürün).我认为有 3 个字段是 textFields(Müşteri、Marka、Ürün)。 Clicking on these fields;
点击这些字段;
This opens a list.这将打开一个列表。 When I tap an option from this list;
当我点击此列表中的一个选项时;
It writes my chosen option inside this textField.它在此文本字段中写入我选择的选项。
So First You Need To Build Your From With The TextFormField
feild and assign a TextEditingController
to That Field, Create Your ListView
With Suggestions And Make it Pop With Result when an Item is Pressed, Now Use The TextFormField
onTap
function To Navigate To The ListView
And then Assign The Returned Value To The Field Using The Controller因此,首先您需要使用
TextFormField
字段构建您的 From 并将TextEditingController
分配给该字段,使用建议创建您的ListView
并在按下项目时使其弹出结果,现在使用TextFormField
onTap
function 导航到ListView
然后使用 Controller 将返回值分配给字段
You can use TextEditingController
to make that functions that you need.您可以使用
TextEditingController
来制作您需要的功能。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.