如何在文本小部件内部的一个列窗口小部件中显示两个API值
我有两个API,其中第一个API具有标题,第二个API值是boolean value false或true。我想在列中显示两个数据 listTile( 领导:文字(标题在此),//第一个API值 尾随:复选框(值:Apivalue,Onchanged(NewVal){}))//第二个API值
I have two api where first api has title and second api value is boolean value false or true. I want to show both data inside a column where
ListTile(
leading: Text(title here), //first Api value
trailing: CheckBox(value: apiValue, onChanged(newVal){})) //second api value
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用FutureBuilder小部件。在您的情况下,由于有两个API端点,我建议您将“未来”参数设置为类似的内容,
可以在listView Builder中访问此数据
然后
You can use the FutureBuilder widget. In your case since there are two API endpoints, I suggest you set the 'future' parameter to something like
You can then access this data in your ListView builder
Now you can use it in your ListTile widget