如何使用 Flutter 从 api 使用 Json Serializable 获取数据

How to get data using Flutter from api using Json Serializable

我遇到了如何在 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--> Items --> Names。 我正在尝试获取数据来为我的目录生成标签栏

使用 https://quicktype.io/ 并为 json 序列化选择 dart