首页 > 解决方案 > 如何将数据存储在 JSON 文件中?

问题描述

我通过以下代码从我的 JSON 文件中获取数据:

var content = await rootBundle.loadString("json/story1.json");
decodedContent = json.decode(content);

我希望能够在story1.json文件中存储一个整数。

标签: flutterdart

解决方案


推荐阅读