【发布时间】:2021-12-11 20:07:14
【问题描述】:
完整的 Android Studio Logcat 投诉:
Dart 未处理的异常:类型 '_AsBroadcastStream
>>' 不是子类型 'Stream
>>>' 类型的
我正在使用GeoFlutterFire2 插件,它致力于在 Geohash 上查询 Firebase。好了没有了!我尝试将pubspec.yaml 更新为更新的cloud_firestore:^3.1.4
似乎已经沉淀了这一点,所以我将 cloud_firestore 滚回 ^2.5.4
setUpJobStream(double _distanceFromUser) {
localJobsStream = geo
.collection(
collectionRef: myFirestore
.collection('GB/Edinburgh/JobsDetailed'))
.within(
center: usersAddressGeoFirePoint,
radius: _distanceFromUser,
field: 'position',
strictMode: true);
localJobsStream.listen((List<DocumentSnapshot<Map<String,dynamic>>> documentList) {
if(documentList.isNotEmpty) {
...
我尝试了显而易见的事情,只需将 localJobsStream.listen 参数切换为:
localJobsStream.listen((List<DocumentSnapshot<Object?>> documentList) {
但它没有用:/
这真的很令人沮丧。感觉我应该是这个的老板,感谢帮助。
【问题讨论】:
标签: flutter google-cloud-firestore geohashing