如何检索数据 json api 以在 flutter 中形成
How to retrieve data json api to form in flutter
我有一个表单文本字段和下拉列表,我有数据 productCode = "INQPREPAID50" 我想在下拉字段中变成 50000 "Nominal"。
这是我的回复json:
{
"responseCode": "0000",
"responseMessage": "Success",
"date": "20200320",
"time": "142352",
"currency": "IDR",
"content": {
"productCode": "INQPREPAID50",
"productName": "INQ Prabayar 50.000"
},
}
如何检索 productCode = "INQPREPAID50" 在下拉菜单中变为只有数字 50000 "Nominal" 并在下一页屏幕中显示数据 json api。请帮我。谢谢
你可以使用一些函数来解析像
setNumber(String title) {
if (title.contains('50') {
return 50000;
} else {
return 0;
}
}
所以只需调用您的 text/widget 示例
Text("${setNumber(productCode)}",
我有一个表单文本字段和下拉列表,我有数据 productCode = "INQPREPAID50" 我想在下拉字段中变成 50000 "Nominal"。
这是我的回复json:
{
"responseCode": "0000",
"responseMessage": "Success",
"date": "20200320",
"time": "142352",
"currency": "IDR",
"content": {
"productCode": "INQPREPAID50",
"productName": "INQ Prabayar 50.000"
},
}
如何检索 productCode = "INQPREPAID50" 在下拉菜单中变为只有数字 50000 "Nominal" 并在下一页屏幕中显示数据 json api。请帮我。谢谢
你可以使用一些函数来解析像
setNumber(String title) {
if (title.contains('50') {
return 50000;
} else {
return 0;
}
}
所以只需调用您的 text/widget 示例
Text("${setNumber(productCode)}",