Flutter 在颤振中填充水平滚动视图
如何检索以下格式的数据,然后将其传递到水平项目列表中 数据格式 我需要获取“添加食物”和“移除食物”的值, 而在每一个根据颜色值“红色”或“黄色”使文本颜色上那个。 还获取该颜色值的内部数据,并在下面的视图中相应地显示它们。 我在迭代上述格式时有点困惑。 我可以调整视图,如下所示。但是,在了解如何迭代这种数据格式时需要一些指导Flutter 在颤振中填充水平滚动视图,flutter,listview,dart,Flutter,Listview,Dart,如何检索以下格式的数据,然后将其传递到水平项目列表中 数据格式 我需要获取“添加食物”和“移除食物”的值, 而在每一个根据颜色值“红色”或“黄色”使文本颜色上那个。 还获取该颜色值的内部数据,并在下面的视图中相应地显示它们。 我在迭代上述格式时有点困惑。 我可以调整视图,如下所示。但是,在了解如何迭代这种数据格式时需要一些指导 "suggestion": { "add_food": { "Red": [
"suggestion": {
"add_food": {
"Red": [
{
"Calcium": [
"Amaranth, grain, whole, uncooked",
"Apple, dried"
]
},
{
"Choline": [
"Amaranth, grain, whole, uncooked",
"Apple, dried"
]
},
{
"Copper": [
"Amaranth, grain, whole, uncooked",
"Apple, dried"
]
},
{
"Iodine": [
"Amaranth, grain, whole, uncooked",
"Apricot, dried"
]
},
{
"Iron": [
"Amaranth, grain, whole, uncooked",
"Apple, dried"
]
},
{
"Manganese": [
"Amaranth, grain, whole, uncooked",
"Apple, dried"
]
},
{
"Niacin (B3)": [
"Apple, fuji, unpeeled, raw",
"Apple, golden delicious, unpeeled, raw"
]
},
{
"Omega-3 excl. ALA and SDA": [
"Bass, fillet, raw",
"Beef Brain"
]
},
{
"Pantothenic acid (B5)": [
"Amaranth, grain, whole, uncooked",
"Apple, dried"
]
},
{
"Phosphorus": [
"Amaranth, grain, whole, uncooked",
"Apple, dried"
]
},
{
"Protein": [
"Amaranth, grain, whole, uncooked",
"Apple, dried"
]
},
{
"Riboflavin (B2)": [
"Amaranth, grain, whole, uncooked",
"Apple, fuji, unpeeled, raw"
]
},
{
"Thiamin (B1)": [
"Amaranth, grain, whole, uncooked",
"Apple, fuji, unpeeled, raw"
]
},
{
"Vitamin D": [
"Beef kidney, raw",
"Beef liver, raw"
]
},
{
"Vitamin E": [
"Amaranth, grain, whole, uncooked",
"Apple, dried"
]
},
{
"Zinc (Zn)": [
"Amaranth, grain, whole, uncooked",
"Apple, dried"
]
},
{
"Crude fat": [
"Amaranth, grain, whole, uncooked",
"Apple, dried"
]
},
{
"Folate": [
"Amaranth, grain, whole, uncooked",
"Apple, fuji, unpeeled, raw"
]
},
{
"Magnesium": [
"Amaranth, grain, whole, uncooked",
"Apple, dried"
]
},
{
"Sodium (Na)": [
"Amaranth, grain, whole, uncooked",
"Apple, dried"
]
}
],
"Yellow": [
{
"Omega-6": [
"Amaranth, grain, whole, uncooked",
"Avocado, raw"
]
},
{
"Potassium": [
"Amaranth, grain, whole, uncooked",
"Apple, dried"
]
}
]
},
"remove_food": {
"Red": [
{
"Selenium": [
"Cheese, cottage, unflavoured, no salt"
]
}
],
"Yellow": [
{
"Vitamin A": [
"Cheese, cottage, unflavoured, no salt",
"Cream, sour, regular fat"
]
}
]
}
},