Flutter:GeoFire库搜索queryAtLocation无法正常工作

时间:2018-06-19 15:51:02

标签: firebase flutter geofire

我正在测试Flutter库https://github.com/bramvbilsen/Flutter-GeoFire
当我从库中加载example / main.dart文件(将其指向我的Firebase)时,setLocation()方法起作用(该条目写入我的FirebaseDB),但读取位置或查询At Location方法无效。

Result From save location to FirebaseDB

//库示例中的方法不起作用。

<div class="cont">
  <div class="item"></div>
  <div class="item"></div>
  <div class="item"></div>
  <div class="item"></div>
</div>

queryAtLocaion的返回消息

  void getAndPrintLocation() {
    geofire.getLocation("Mechelen", new LocationCallBack(
            (String key, List<double> location) {
          print("Successfully received location!");
          print(key + ": " + location.toString());
        },
            (DatabaseError error) {
          print("Error receiving location!");
          print(error.toString());
        }
    ));
  }

  void createQuery(List<double> location, double radius) {
    this.query = geofire.queryAtLocation(location, radius);
    print(this.query.toString());
  }

我想念的是什么。我只是想从queryAtLocaion(位置,半径)获取键

0 个答案:

没有答案