简体   繁体   中英

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). Clicking on these fields;

在此处输入图像描述

This opens a list. When I tap an option from this list;

在此处输入图像描述

It writes my chosen option inside this textField.

  • Which Widgets and how do I need to use it so that I can do this?
  • How can I print data from a list into textField or textFormField?
  • How can I redirect to a list when textField is clicked?

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

You can use TextEditingController to make that functions that you need.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM