简体   繁体   English

小部件进入列表视图或 flutter 中的数据

[英]Widget into listview or datable in flutter

I need to do something like this:我需要做这样的事情:

在此处输入图像描述

if I push the red button a row will be deleted如果我按下红色按钮,一行将被删除

if I push the green button a row will be added between last row with red button and the row with green button如果我按下绿色按钮,将在带有红色按钮的最后一行和带有绿色按钮的行之间添加一行

Ingredient's row need 3 text inputs Direction's row need only one text input成分行需要 3 个文本输入 方向行只需要 1 个文本输入

of course at finish I need to read all data of all text inputs当然在完成时我需要读取所有文本输入的所有数据

what do you recommend to use你建议使用什么

You can use dynamic form to get all data after the adding field and field add dynamically in form,您可以使用动态表单获取添加字段后的所有数据,并在表单中动态添加字段,

You can refer this video.你可以参考这个视频。

And also you can validate form refer .您还可以验证表单参考

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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