【发布时间】:2021-01-18 20:28:52
【问题描述】:
我正在将一个 Json 文件从本地磁盘加载到我的颤振项目中名为 mydata 的列表中:
String jsonfile;
jsonfile = "assets/derechopenal.json"
future: DefaultAssetBundle.of(context).loadString(jsonfile, cache: false),
builder: (context, snapshot) {
List mydata = json.decode(snapshot.data.toString());
return testpage(mydata: mydata)
}
如果现在将这个 json 文件上传到 firebase 数据库,我该如何以同样的方式获取它?
https://opositestgc.firebaseio.com/derechopenal
我已经添加了所有需要的依赖项和包,as seen here 并且我卡在代码请求中。谢谢
【问题讨论】:
标签: json database firebase flutter http