首页 > 解决方案 > 如何使用提供的来自 REST API 的 JSON 在颤振中动态添加复选框/单选按钮组?

问题描述

如何从 Flutter 中的以下 JSON 开发附加的 UI,其中包括一组复选框/单选按钮并存储更新的值?

"item_options": "{\"Size\":{\"Large\":\"50\",\"Medium\":\"30\",\"Small\":\"0\"}}",
"store_options": "{\"Add-Ons\":{\"BBQ Sauce\":\"20\",\"Extra Cheese\":\"25\",\"Pepperoni\":\"40\"},\"Sauce Level\":{\"Less Sauce\":\"0\",\"Regular\":\"0\",\"More Sauce\":\"0\"},\"Spice Level\":{\"Less Spicy\":\"0\",\"Mild\":\"0\",\"Very Spicy\":\"0\"}}",

https://postimg.cc/bZCjVYGM

标签: jsonflutterdart

解决方案


推荐阅读