简体   繁体   中英

TextField in Listview.builder {Flutter}

I'm trying to create an app that takes so much values and gives me back some results. For that I need to create a ListView.builder that holds bunch of TextFields. But I can't seem to find any solution. Please explain the solution thoroughly. Thank you

ListView.builder is nothing but helps you build N number of a single widget which you will pass into the ListView.builder . To give you more insight on that, I would suggest two picked up references which will help in you great extent, these are:

How this works is, you need to pass on some important aspects, like

  • The number of widget you want to display
  • Scroll Direction [If you want to have a horizontal, it is vertical by default]

This is how you create a ListView.builder

ListView.builder(
  itemCount: litems.length,
  itemBuilder: (BuildContext ctxt, int index) {
    return new TextField();
  }
)

Above data will give you clarifications on this widget. Also, I would suggest to follow StackOverFlow Policy of asking question. I would definitely suggest you to follow the below steps before you ask question:

  • Research on some documentation, in this case, Flutter Dev Docs will help you in great extent
  • Google it, you will get it for sure
  • Give out the things which you have tried so far, to the developers here, to help them understand what is your real requirement, do not ask it without having tried anything

I hope this might help you in a great way. Feel free to drop in a comment, if you would like to add something to it. Happy Learning, and welcome to the Flutter Community:)

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