I need to create a expansion list in flutter filter with heading as main category and child as subcategores
here is my list
[
{
"id": 1,
"name": "abc",
"child": [
{
"id": 29,
"name": "sample 1",
"child": [],
"media": []
},
{
"id": 29,
"name": "sample 1",
"child": [],
"media": []
},
{
"id": 29,
"name": "sample 1",
"child": [],
"media": []
}
]
},
{
"id": 1,
"name": "abc",
"child": [
{
"id": 29,
"name": "sample 1",
"child": [],
"media": []
},
{
"id": 29,
"name": "sample 1",
"child": [],
"media": []
},
{
"id": 29,
"name": "sample 1",
"child": [],
"media": []
}
]
},
{
"id": 1,
"name": "abc",
"child": [
{
"id": 29,
"name": "sample 1",
"child": [],
"media": []
},
{
"id": 29,
"name": "sample 1",
"child": [],
"media": []
},
{
"id": 29,
"name": "sample 1",
"child": [],
"media": []
}
]
}
]
I need to add it as categories and sub categories as list
example
abc
sample 1
sample 2
kindly let us know how to create list inside list in expansion panel . is there any other option to show in as filter kindly suggest
question from:https://stackoverflow.com/questions/65559565/expansion-panel-list-in-flutter-with-dynamic-list-in-flutter