I am trying to integrate this add stock feature into the app,but i am kind of stuck how do pass those incremented items data to http package,i have made view and shows data just like this
please checkout entire code for this process
https://github.com/Abhijithsp/flutter-image_upload/blob/master/Add%20Stocks.dart
Process
How do i pass the data just like this
{
"id" : "", //NOT NULL IF EDIT
"station_id": 2,
"name" : "Test Stocks",
"unit" : "1", (DROPDOWN) ==>1 UNITS
"branches" : [{
"branch_id": 87,
"kg" : 10,
"gm" : 5,
"ltr" : 0,
"ml" : 0,
"counter" : 0
},{
"branch_id": 88,
"kg" : 10,
"gm" : 8,
"ltr" : 0,
"ml" : 0,
"counter" : 0
},
]
}