Davide Vuolo
ย ยทย Founder at Softlife Co.

Dynamic children in ListView from two Lists

Hi everyone, I'm struggling with a logic problem in FF. This is the actual flow conceptually:

1- The user click the add button

2- Is shown a page in which he will put account name and account amount

3- When he clicks submit I update two appstate variable of type List string called accountNamesList and accountAmountsList

4- I have 2 ListView with a text field, all is wrapped in 2 different containers, and they're wrapped in a row that is wrapped in another container. And this part I want to optimize. In the firts ListView I generate dynamic children from the list accountNamesList, in the second I retrieve data from accountAmountsList

step1.png
95.04KB

step4.png
83.76KB

step3.png
29.31KB

step2.png
10.38KB

My goal is: user insert name and amount and this 2 variable as passed in a list that is used to generate dynamic children in a ListView. But I did cannot do it with one list and I need to use two lists, one containing names and one containing values.

For example
name: account1
value: 100$
etc...

The problem here is working smart with list and app state variables

Is there a way to create a simpler version of this flow? For instance using one list and one container and one ListView?

Thank you for the help

3 replies