我在我的flutter应用程序中使用云端防火墙。
我有一个文档,其中有一个对象,而对象又有一些键值对。
child "jamesjr",
message
Time August 19, 2018 at 12:00:00 AM UTC+5:30
msgbody "Hello, This is the first private message model"
pic1 "https://www.bing.com/th?id=OIP.HXmR02Xik3jiwFr8aN6NyQHaD4&w=269&h=149&c=7&o=5&pid=1.7"
pic2 "https://www.bing.com/th?id=OIP.Y11MMH-KHgXj0GyJJKC3lgHaFJ&w=255&h=177&c=7&o=5&pid=1.7",
reciever "wjames",
sender "steaher" ,
现在,我知道我可以通过使用来访问文档顶层的键值对 :
Text('${ds['child']}')
但是,如何在我的文档中阅读“ msgbody
?
发布于 2018-08-20 14:19:06
你以同样的方式阅读它,因为它也转换为Map
:
document.data['message']['msgbody']
https://stackoverflow.com/questions/-100006021
复制相似问题