How to store list of object data in sqlite on Flutter?

别说谁变了你拦得住时间么 提交于 2021-02-07 07:20:30

问题


How to store a list of object data in SQLite on Flutter? Json data coming with API.

{
     "images": [
        {
          "id": 10,
          "name": "img1"
        },
        {
          "id": 11,
          "name": "img2"
        }
      ]
}

回答1:


  • use flutter sqlite package
  • make helper class for db operations and model class example here
  • parse json and insert or update data


来源:https://stackoverflow.com/questions/55232650/how-to-store-list-of-object-data-in-sqlite-on-flutter

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!