如何在扑朔迷离中从火场上的地图上显示标记?

时间:2019-12-06 04:15:49

标签: google-maps flutter dart

我正在尝试从Firestore在地图上显示标记,并且使用了Google Maps Flutter插件,但是标记未显示在地图上。我试图在模拟器和Android手机上运行该应用程序。 请帮忙。

这是代码:

column1   column2         column3
feri      football       12-Mar-2015
feri      football       15-Nov-2017
feri      football       5-Dec-2019
feri      Volley Ball    12-Dec-2018
sugi      football       5-Dec-2018

代码中的错误是什么?

1 个答案:

答案 0 :(得分:0)

StreamBuilder<List<ScanResult>>(
   stream: FlutterBlue.instance.scanResults,
   initialData: [],
   builder: (c, snapshot) {
   //child: I don't know what this (child:) parameter is doing here, 
   //there is no child inside the builder
     if(snapshot.data.length > 0) //check if there is data to map,
                                  // initialData is an empty List so it won't map anything
       return snapshot.data.map((r) => () { //You forgot the return here
         return _buildResult(r);
       }); //endof map
     else return SizedBox();
}),