flutter - 如何将数据存储在 JSON 文件中?
问题描述
我通过以下代码从我的 JSON 文件中获取数据:
var content = await rootBundle.loadString("json/story1.json");
decodedContent = json.decode(content);
我希望能够在story1.json
文件中存储一个整数。
解决方案
推荐阅读
- react-native - 用玩笑在本地模拟 react-native-appearance
- android - 使用 Array.asList(myArray) 检查字符串是否存在于数组中不起作用
- javascript - Django jQuery $.ajax() 不是使用完整构建 cdn 的函数
- javascript - 在 For 循环中按顺序创建 p5.js 实例,但仅在前一个完成之后
- java - 无法解密:ENC(2nmnp3B) 原因:org.jasypt.exceptions.EncryptionOperationNotPossibleException:null
- snowflake-cloud-data-platform - 一旦找到足够的行,雪花 TOP/Limit/Fetch 是否会停止处理?
- kubernetes - Prometheus 配置忽略 Kubernetes 中特定命名空间的指标抓取
- java - Jenkins 构建 UnsatisfiedDependencyException:创建带有名称的 bean 时出错
- google-apps-script - 有没有办法在谷歌表格中制作与谷歌应用脚本相关的按钮?
- python - 每分钟播放声音