I have below JSON data fetched from server, which I need to fetch and configure in pageviewbuilder as well as listview builder in flutter application.
Listview builder(vertical scroll) is nested in Pageview builder(horizontal scroll), this I already configured
Things To be Display are like this
Page ---------- Order Items
Order 16 >> Order 16, item 1 , Order 16 item 2
Order 18 >> Order 18, item 1 , Order 18 item 2 , order 18 item 3
I am new to the learning of JSON in flutter, please guide me how should I fetch the data and use to for the configuration of the above as required.
{
"error": "false",
"content": [
{
"comp_code": "4",
"comp_name": "KMT OVERSEAS",
"order_no": "16",
"soh_pk": "23660",
"order_items": [
{
"comp_code": "4",
"comp_name": "KMT OVERSEAS",
"order_no": "16",
"sod_pk": "31689",
},
{
"comp_code": "4",
"comp_name": "KMT OVERSEAS",
"order_no": "16",
"sod_pk": "31688",
}
]
},
{
"comp_code": "4",
"comp_name": "KMT OVERSEAS",
"order_no": "18",
"soh_pk": "23702",
"order_items": [
{
"comp_code": "4",
"comp_name": "KMT OVERSEAS",
"order_no": "18",
"sod_pk": "31749",
},
{
"comp_code": "4",
"comp_name": "KMT OVERSEAS",
"order_no": "18",
"sod_pk": "31742",
},
{
"comp_code": "4",
"comp_name": "KMT OVERSEAS",
"order_no": "18",
"sod_pk": "31743",
},
]
}
]
}