【发布时间】:2022-01-04 04:34:34
【问题描述】:
我遇到了一个问题,如何在 Flutter 中使用 json 可序列化包生成和使用数据模型类
{
"listNavigationalCatalogs": {
"items": [
{
"catalogCategories": {
"items": [
{
"categoryTheme": {
"backgroundColor": {
"blue": 226,
"green": 215,
"red": 163
},
"descriptionColor": null,
"indicatorColor": {
"red": 54,
"green": 186,
"blue": 228
},
"selectedColor": null,
"unSelectedColor": null
},
"description": "Adventure Sports",
"button": {
"color": {
"blue": 228,
"green": 186,
"red": 54
},
"text": "SEE ALL",
"textColor": null
},
"image": "https://i.postimg.cc/pLjSRBvn/adv.jpg",
"name": "Adventure",
"priority": 3,
"_deleted": null
}
]
},
"version": 1,
"interval": 1,
"fetchedDate": "2021-11-25T00:00Z",
"fetchRealTime": false,
"expiryDate": "2021-11-25T00:00Z"
}
]
}
}
我是新手,请帮助我如何使用它我想从所有项目中获取数据 -->catalogCategories--> 项目 --> 名称。 我正在尝试获取数据来为我的目录生成标签栏
【问题讨论】:
标签: json flutter dart serialization