【发布时间】:2018-08-13 06:42:09
【问题描述】:
我正在使用 Flutter 开发移动应用程序。
我是 JSON 新手。如何从 JSON 对象中检索多个值?
body: new Column(
children: <Widget>[
new ListTile(
title: new Text("$(_jsondata['name'])"),// json object calling
),
]
);
) 得到了值,但现在我想调用多个值,例如 desc、url、id 其他字段。我尝试了$(_jsondata['name']['desc']),但无法实现。
【问题讨论】:
-
你希望其他字段去哪里?
-
也添加您的 JSON 对象结构。
-
new Text("name : $(_jsondata['name']) url : $(_jsondata['url'])") -
@Raouf Rahiche 谢谢我明白了。
-
@RaoufRahiche 那就让它成为答案吧。